-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit a54c64aed5c86a6b1e9e9c93df3670e761092bb9 Author: Dominik Jain <[email protected]> Date: Thu Jul 13 11:29:05 2023 +0200 Address deprecation warning in OneHotEncoder src/sensai/data_transformation/dft.py commit 34d1cacac4648958e6481c57e8456879e54924f7 Author: Dominik Jain <[email protected]> Date: Thu Jul 13 11:28:39 2023 +0200 Add util.version to facilitate version-dependent changes in dependencies src/sensai/util/version.py commit 21660307061ec79e120c3d3e89bed59afef3e058 Author: Dominik Jain <[email protected]> Date: Wed Jul 12 20:25:21 2023 +0200 Added keyword parameter removeInputPreprocessors (and changed old behaviour as the default is False), because the removal of input preprocessors is strictly valid only if no learning is involved, which is a strong assumption src/sensai/feature_selection/rfe.py commit 982d8cd9eb14ec4a943557487e4a06e8da47422e Author: Dominik Jain <[email protected]> Date: Wed Jul 12 20:25:09 2023 +0200 VectorModel.withFeatureTransformers: Allow the existing list of transformers to be exended src/sensai/data_transformation/dft.py src/sensai/vector_model.py commit b29816643d7f3aba6ef8546e6c76adcdc1a31867 Author: Dominik Jain <[email protected]> Date: Wed Jul 12 14:28:13 2023 +0200 Improve type hints of builder-style 'with*' methods (parametric polymorphism) src/sensai/vector_model.py
- Loading branch information
Showing
4 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
|
||
class Version: | ||
""" | ||
Assists in checking the version of a Python package based on the __version__ attribute | ||
""" | ||
def __init__(self, package): | ||
""" | ||
:param package: the package object | ||
""" | ||
self.components = package.__version__.split(".") | ||
|
||
def isAtLeast(self, *components: int): | ||
""" | ||
Checks this version against the given version components. | ||
This version object must contain at least the respective number of components | ||
:param components: version components in order (i.e. major, minor, patch, etc.) | ||
:return: True if the version is at least the given version, False otherwise | ||
""" | ||
for i, desired_min_version in enumerate(components): | ||
actual_version = int(self.components[i]) | ||
if actual_version < desired_min_version: | ||
return False | ||
elif actual_version > desired_min_version: | ||
return True | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters