sklearn.linear model.LassoLarsIC

From GM-RKB
Jump to navigation Jump to search

A sklearn.linear model.LassoLarsIC is an LASSO-LARS Information Criteria System within sklearn.linear_model class.

  • Context:
    • Usage:
1) Import LassoLarsIC model from scikit-learn : from sklearn.linear_model import LassoLarsIC
2) Create design matrix X and response vector Y
3) Create LassoLarsIC object: model=LassoLarsIC([criterion=’aic’, fit_intercept=True, verbose=False, normalize=True, precompute=’auto’, max_iter=500, eps=2.2204460492503131e-16, copy_X=True, positive=False, ...])
4) Choose method(s):


References

2017A

Lasso model fit with Lars using BIC or AIC for model selection
The optimization objective for Lasso is:
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
AIC is the Akaike information criterion and BIC is the Bayes Information criterion. Such criteria are useful to select the value of the regularization parameter by making a trade-off between the goodness of fit and the complexity of the model. A good model should explain well the data while being simple.

2017B

(...)
The algorithm is similar to forward stepwise regression, but instead of including variables at each step, the estimated parameters are increased in a direction equiangular to each one’s correlations with the residual.
Instead of giving a vector result, the LARS solution consists of a curve denoting the solution for each value of the L1 norm of the parameter vector. The full coefficients path is stored in the array coef_path_, which has size (n_features, max_features+1). The first column is always zero.