lale.lib.autogen.elastic_net module¶
- class lale.lib.autogen.elastic_net.ElasticNet(*, alpha=1.0, l1_ratio=0.5, fit_intercept=True, precompute=False, max_iter=1000, copy_X=True, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic')¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
alpha (float, >=1e-10 for optimizer, <=1.0 for optimizer, loguniform distribution, default 1.0) – Constant that multiplies the penalty terms
l1_ratio (float, not for optimizer, default 0.5) – The ElasticNet mixing parameter, with
0 <= l1_ratio <= 1
fit_intercept (boolean, default True) – Whether the intercept should be estimated or not
precompute (union type, not for optimizer, default False) –
Whether to use a precomputed Gram matrix to speed up calculations
array of items : Any
or boolean
max_iter (integer, >=10 for optimizer, <=1000 for optimizer, uniform distribution, default 1000) – The maximum number of iterations
copy_X (boolean, default True) – If
True
, X will be copied; else, it may be overwritten.tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, default 0.0001) – The tolerance for the optimization: if the updates are smaller than
tol
, the optimization code checks the dual gap for optimality and continues until it is smaller thantol
.warm_start (boolean, not for optimizer, default False) – When set to
True
, reuse the solution of the previous call to fit as initialization, otherwise, just erase the previous solutionpositive (boolean, default False) – When set to
True
, forces the coefficients to be positive.random_state (union type, not for optimizer, default None) –
The seed of the pseudo random number generator that selects a random feature to update
integer
or numpy.random.RandomState
or None
selection (‘random’ or ‘cyclic’, default ‘cyclic’) – If set to ‘random’, a random coefficient is updated every iteration rather than looping over features sequentially by default
- 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 (Any) – Data
y (Any) – Target
check_input (boolean, optional, default True) – Allow to bypass several input checking
- 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 (union type) –
Samples.
array of items : Any
or array of items : array of items : float
- Returns
result – Returns predicted values.
- Return type
array of items : float