summit.multiview_platform.monoview_classifiers.lasso
lasso
- classifier_class_name = Lasso
- class Lasso(random_state=None, alpha=1.0, max_iter=10, warm_start=False, **kwargs)
This class is an adaptation of scikit-learn’s Lasso
- fit(self, X, y, check_input=True)
Fit model with coordinate descent.
- Parameters
X ({ndarray, sparse matrix} of (n_samples, n_features)) – Data.
y ({ndarray, sparse matrix} of shape (n_samples,) or (n_samples, n_targets)) – Target. Will be cast to X’s dtype if necessary.
sample_weight (float or array-like of shape (n_samples,), default=None) –
Sample weights. Internally, the sample_weight vector will be rescaled to sum to n_samples.
New in version 0.23.
check_input (bool, default=True) – Allow to bypass several input checking. Don’t use this parameter unless you know what you do.
- Returns
self – Fitted estimator.
- Return type
object
Notes
Coordinate descent is an algorithm that considers each column of data at a time hence it will automatically convert the X input as a Fortran-contiguous numpy array if necessary.
To avoid memory re-allocation it is advised to allocate the initial data in memory directly using that format.
- predict(self, X)
Predict using the linear model.
- Parameters
X (array-like or sparse matrix, shape (n_samples, n_features)) – Samples.
- Returns
C – Returns predicted values.
- Return type
array, shape (n_samples,)