Skip to content

Documentation for LassoFeatureSelection

Lasso based feature selection - based on feature_importance.

Apply Lasso to ModelSelection.

__init__(self, percentile=0.3, alpha=1.0, **kwargs) special

Initialize the object.

Parameters:

Name Type Description Default
percentile float

bool, default=False Percent of features to keep.

0.3
alpha float

float, default=1. Weighting parameter for Lasso.

1.0
**kwargs

Passed to Lasso object.

{}
Source code in photonai/modelwrapper/feature_selection.py
def __init__(self, percentile: float = 0.3, alpha: float = 1., **kwargs):
    """
    Initialize the object.

    Parameters:
        percentile: bool, default=False
            Percent of features to keep.

        alpha: float, default=1.
            Weighting parameter for Lasso.

        **kwargs:
            Passed to Lasso object.

    """
    self.percentile = percentile
    self.alpha = alpha
    self.model_selector = None
    self.Lasso_kwargs = kwargs
    self.needs_covariates=False
    self.needs_y = False