Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self):
BaseStep.__init__(self,
hyperparams=HYPERPARAMETERS,
hyperparams_space=HYPERPARAMETERS_SPACE,
name="MockStep"
)
def __init__(self):
BaseStep.__init__(self)
self.fitted_data = []
def __init__(self, wrapped):
"""
Wrap a scikit-learn MetaEstimatorMixin for usage in Neuraxle.
This class is similar to the SKLearnWrapper class of Neuraxle that can wrap a scikit-learn BaseEstimator.
:param wrapped: a scikit-learn object of type "MetaEstimatorMixin".
"""
MetaStepMixin.__init__(self)
BaseStep.__init__(self)
self.wrapped_sklearn_metaestimator = wrapped # TODO: use self.set_step of the MetaStepMixin instead?
# sklearn.model_selection.RandomizedSearchCV
def __init__(self, columns_selection, n_dimension=3):
BaseStep.__init__(self)
col_selector = ColumnSelector2D(columns_selection=columns_selection)
for _ in range(min(0, n_dimension - 2)):
col_selector = ForEachDataInput(col_selector)
MetaStepMixin.__init__(self, col_selector)
self.n_dimension = n_dimension
def __init__(self):
BaseStep.__init__(self)
NonFittableMixin.__init__(self)
def __init__(self, scoring_function=r2_score, joiner=NumpyConcatenateOuterBatch()):
MetaStepMixin.__init__(self)
BaseStep.__init__(self)
self.scoring_function = scoring_function
self.joiner = joiner
def __init__(
self,
wrapped: BaseStep,
cache_folder: str = DEFAULT_CACHE_FOLDER,
value_hasher: 'BaseValueHasher' = None,
):
BaseStep.__init__(self)
MetaStepMixin.__init__(self, wrapped)
self.value_hasher = value_hasher
if self.value_hasher is None:
self.value_hasher = Md5Hasher()
self.cache_folder = cache_folder
def __init__(self, wrapped):
MetaStepMixin.__init__(self, wrapped)
BaseStep.__init__(self)
def __init__(
self,
hyperparameter_optimizer: BaseHyperparameterOptimizer,
validation_technique: BaseCrossValidationWrapper = None,
higher_score_is_better=True
):
MetaStepMixin.__init__(self, None)
BaseStep.__init__(self)
if validation_technique is None:
validation_technique = KFoldCrossValidationWrapper()
self.validation_technique = validation_technique
self.higher_score_is_better = higher_score_is_better
self.hyperparameter_optimizer = hyperparameter_optimizer