I once saw the following code segment of using lasso model based on scikit-learn
lasso = LassoCV(normalize = True, max_iter=2000)
lasso.fit(X_train, y_train);
lasso.score(X_test, y_test)
y_pred = lasso.predict(X_test)
I can understand lasso.fit
and lasso_predict
, but what does lasso.score
generally offer? According to the scikit-learn
, it Returns the coefficient of determination R^2 of the prediction
. I am not quite clear how to use this kind of information?