eckity.sklearn_compatible.sk_regressor

1from sklearn.base import RegressorMixin
2
3from eckity.sklearn_compatible.sklearn_wrapper import SklearnWrapper
4
5
6class SKRegressor(SklearnWrapper, RegressorMixin):
7    pass
class SKRegressor(eckity.sklearn_compatible.sklearn_wrapper.SklearnWrapper, sklearn.base.RegressorMixin):
7class SKRegressor(SklearnWrapper, RegressorMixin):
8    pass

Sklearn-compatible wrapper to support evolution using sklearn methods.

Parameters
  • algorithm (Algorithm): Wrapped Evolutionary algorithm. The Wrapper invokes 'evolve' and 'execute' methods of the algorithm during the fitting and prediction process, respectively.
Attributes
  • is_fitted (bool): Determines if the model is fitted (evolved).
def set_partial_fit_request(unknown):

Descriptor for defining set_{method}_request methods in estimators.

New in version 1.3.

Parameters
  • name (str): The name of the method for which the request function should be created, e.g. "fit" would create a set_fit_request function.
  • keys (list of str): A list of strings which are accepted parameters by the created function, e.g. ["sample_weight"] if the corresponding method accepts it as a metadata.
  • validate_keys (bool, default=True): Whether to check if the requested parameters fit the actual parameters of the method.
Notes

This class is a descriptor 1 and uses PEP-362 to set the signature of the returned function 2.

References
def set_score_request(unknown):

Descriptor for defining set_{method}_request methods in estimators.

New in version 1.3.

Parameters
  • name (str): The name of the method for which the request function should be created, e.g. "fit" would create a set_fit_request function.
  • keys (list of str): A list of strings which are accepted parameters by the created function, e.g. ["sample_weight"] if the corresponding method accepts it as a metadata.
  • validate_keys (bool, default=True): Whether to check if the requested parameters fit the actual parameters of the method.
Notes

This class is a descriptor 1 and uses PEP-362 to set the signature of the returned function 2.

References