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

param_names = ['max_iter', 'alpha', 'random_state']
classed_params = []
distribs
weird_strings
fit(X, y, check_input=True)

Fit model with coordinate descent.

Parameters:
  • X ({ndarray, sparse matrix, sparse array} of (n_samples, n_features)) –

    Data.

    Note that large sparse matrices and arrays requiring int64 indices are not accepted.

  • y (ndarray 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.

    Added 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(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,)