lale.lib.autogen.ransac_regressor module¶
- class lale.lib.autogen.ransac_regressor.RANSACRegressor(*, min_samples=None, residual_threshold=None, is_data_valid=None, is_model_valid=None, max_trials=100, max_skips=inf, stop_n_inliers=inf, stop_score=inf, stop_probability=0.99, loss='absolute_error', random_state=None, estimator=None)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
min_samples (union type, default None) –
Minimum number of samples chosen randomly from original data
float, >=0.0 for optimizer, <=1.0 for optimizer, uniform distribution
or None
residual_threshold (union type, not for optimizer, default None) –
Maximum residual for a data sample to be classified as an inlier
float
or None
is_data_valid (union type, not for optimizer, default None) –
This function is called with the randomly selected data before the model is fitted to it: is_data_valid(X, y)
callable
or None
is_model_valid (union type, not for optimizer, default None) –
This function is called with the estimated model and the randomly selected data: is_model_valid(model, X, y)
callable
or None
max_trials (integer, >=100 for optimizer, <=101 for optimizer, uniform distribution, default 100) – Maximum number of iterations for random sample selection.
max_skips (union type, default inf) –
Maximum number of iterations that can be skipped due to finding zero inliers or invalid data defined by
is_data_valid
or invalid models defined byis_model_valid
integer, not for optimizer
or inf
stop_n_inliers (union type, default inf) –
Stop iteration if at least this number of inliers are found.
integer, not for optimizer
or inf
stop_score (float, not for optimizer, default inf) – Stop iteration if score is greater equal than this threshold.
stop_probability (float, not for optimizer, default 0.99) – RANSAC iteration stops if at least one outlier-free set of the training data is sampled in RANSAC
loss (union type, default 'absolute_error') –
String inputs, “absolute_error” and “squared_error” are supported which find the absolute error and squared error per sample respectively
callable, not for optimizer
or ‘absolute_error’ or ‘squared_error’
random_state (union type, not for optimizer, default None) –
The generator used to initialize the centers
integer
or numpy.random.RandomState
or None
estimator (union type, optional, not for optimizer, default None) –
Base estimator object which implements the following methods: * fit(X, y): Fit model to given training data and target values
dict
or None
Notes
constraint-1 : any type
constraint-2 : any type
- 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 (union type) –
Training data.
array of items : Any
or array of items : array of items : float
y (union type) –
Target values.
array of items : float
or array of items : array of items : float
sample_weight (array, optional of items : float) – Individual weights for each sample raises error if sample_weight is passed and base_estimator fit method does not support it.
- 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) –
- Returns
result – Returns predicted values.
array of items : float
or array of items : array of items : float
- Return type
union type