lale.lib.autogen.transformed_target_regressor module¶
- class lale.lib.autogen.transformed_target_regressor.TransformedTargetRegressor(*, regressor=None, transformer=None, func=None, inverse_func=None, check_inverse=True)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
regressor (None, not for optimizer, default None) – Regressor object such as derived from
RegressorMixin
transformer (union type, not for optimizer, default None) –
Estimator object such as derived from
TransformerMixin
dict
or None
See also constraint-1, constraint-2.
func (None, not for optimizer, default None) –
Function to apply to
y
before passing tofit
See also constraint-2.
inverse_func (None, not for optimizer, default None) –
Function to apply to the prediction of the regressor
See also constraint-2.
check_inverse (boolean, not for optimizer, default True) – Whether to check that
transform
followed byinverse_transform
orfunc
followed byinverse_func
leads to the original targets.
Notes
constraint-1 : union type
transformer’ and functions ‘func’/’inverse_func’ cannot both be set.
transformer : None
or intersection type
dict of func : None
and dict of inverse_func : None
constraint-2 : union type
When ‘func’ is provided, ‘inverse_func’ must also be provided
intersection type
dict of transformer : negated type of None
and union type
dict of func : negated type of None
or dict of inverse_func : negated type of None
or transformer : negated type of None
or func : None
or inverse_func : negated type of None
- fit(X, y=None, **fit_params)¶
Train the operator.
Note: The fit method is not available until this operator is trainable.
Once this method is available, it will have the following signature:
- Parameters
X (array of items : array of items : float) – Training vector, where n_samples is the number of samples and n_features is the number of features.
y (array of items : float) – Target values.
sample_weight (Any, optional) – Array of weights that are assigned to individual samples
- predict(X, **predict_params)¶
Make predictions.
Note: The predict method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (array of items : array of items : float) – Samples.
- Returns
result – Predicted values.
- Return type
array of items : float