I've seen some jupyter notebooks that seem to combine LassoCV with cross_val_score, and I'm confused what the point is.

Usually the working flow looks like:

alpha = [some array of alpha values]
lasso = LassoCV(cv=5, alphas=alphas)
cross_val_score(lasso, X_train, y_train ,cv=5)

What is the point of using cross_val_score if there's already CV embedded within LassoCV?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.