What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-15 08:03:12
scikit learn lasso regression
from sklearn import linear_model reg = linear_model.Lasso(alpha=0.1).fit(X, y) reg.fit(X, y) #We can fit Lasso to the dataset in this way too clf.score(X, y) #Return the mean accuracy on the given test data and labels cfl.predict(X) #Return the prediction... Add solution -
Python 2021-09-13 00:02:02
tech with tim
import pandas as pd import numpy as np import sklearn from sklearn import linear_model from sklearn.utils import shuffle data = pd.read_csv("student-mat.csv", sep=";") data = data[["G1", "G2", "G3", &quo... Add solution