What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-31 00:56:26
scikit learn Elastic net
from sklearn.linear_model import ElasticNet EN = ElasticNet(random_state=0) EN.fit(X, y) EN.score(X, y) #Return the mean accuracy on the given test data and labels EN.predict(X) #Return the predictions #Regression Metrics #Mean Absolute Error from sklea... Add solution -
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