TransWikia.com

Lasso Regression - Finding multiple candidate models

Cross Validated Asked by Jlearner on December 16, 2020

I have 20 predictors and I am attempting to find several candidate models to then test.

I am using the LassoCV library, my following code provides me with the alpha and co-efficients of a model.

model = LassoCV(cv=3,max_iter=1000).fit(predictors,      returns.values.ravel())

My question is: how do I get multiple candidate models, since this only provides me with 1 set of alpha and co-efficients.

Thanks.

One Answer

Have you tried the lasso_path function? It provides a coefficient path, but no cross-validation error.

Documentation can be found here

Answered by Эрван on December 16, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP