BinarizeTargetClassifier
galaxy_ml.binarize_target._binarize_estimators.BinarizeTargetClassifier(classifier, z_score=-1, value=None, less_is_positive=True, verbose=0)
Convert continuous target to binary labels (True and False) and apply a classification estimator.
Parameters
- classifier: object
Estimator object such as derived from sklearnClassifierMixin
. - z_score: float, default=-1.0
Threshold value based on z_score. Will be ignored when fixed_value is set - value: float, default=None
Threshold value - less_is_positive: boolean, default=True
When target is less the threshold value, it will be converted to True, False otherwise. - verbose: int, default=0
If greater than 0, print discretizing info.
Attributes
- classifier_: object
Fitted classifier - discretize_value: float
The threshold value used to discretize True and False targets
BinarizeTargetRegressor
galaxy_ml.binarize_target._binarize_estimators.BinarizeTargetRegressor(regressor, z_score=-1, value=None, less_is_positive=True, verbose=0)
Extend regression estimator to have discretize_value
Parameters
- regressor: object
Estimator object such as derived from sklearnRegressionMixin
. - z_score: float, default=-1.0
Threshold value based on z_score. Will be ignored when value is set - value: float, default=None
Threshold value - less_is_positive: boolean, default=True
When target is less the threshold value, it will be converted to True, False otherwise. - verbose: int, default=0
If greater than 0, print discretizing info.
Attributes
- regressor_: object
Fitted regressor - discretize_value: float
The threshold value used to discretize True and False targets
BinarizeTargetTransformer
galaxy_ml.binarize_target._binarize_estimators.BinarizeTargetTransformer(transformer, z_score=-1, value=None, less_is_positive=True)
Extend transformaer to work for binarized target.
Parameters
- transformer: object
Estimator object such as derived from sklearnTransformerMixin
, including feature_selector and preprocessor - z_score: float, default=-1.0
Threshold value based on z_score. Will be ignored when fixed_value is set - value: float, default=None
Threshold value - less_is_positive: boolean, default=True
When target is less the threshold value, it will be converted to True, False otherwise.
Attributes
- transformer_: object
Fitted regressor - discretize_value: float
The threshold value used to discretize True and False targets
_BinarizeTargetThresholdScorer
sklearn.metrics.scorer._BinarizeTargetThresholdScorer(score_func, sign, kwargs)
Base class to make binarized target specific scorer.