import numpy as np
# from sklearn.model_selection import train_test_split
# X = []
# y = []
# X_train, X_test, y_train, y_test = train_test_split(X,y,test_size = 0.20)

from skleran.linear_model import Ridge
from sklearn.linear_model import Lasso
from sklearn.linear_model import ElasticNet
alpha = [1e-3,1e-2,1e-1,1,1e1,1e2,1e3]
l1_ratio = [0,0.25,0.5,0.75,1]
regr = ElasticNet(alpha = alpha, l1_ratio = l1_ratio,max_iter = 1000)
regr.fit(X_train,y_train)

clf = Lasso(alpha = alpha, max_iter = 1000)
clf.fit(X_train,y_train)
# clf.coef_ returns nx1 matrix


y_predict_regr = regr.predict(X_test)
y_predict_clf = clf.predict(X_test)
c3bef9fdc941ed58a2aab81ef5e6d22f85ccf03f
<mask token>

<mask token>
regr.fit(X_train, y_train)
<mask token>
clf.fit(X_train, y_train)
<mask token>

<mask token>
alpha = [0.001, 0.01, 0.1, 1, 10.0, 100.0, 1000.0]
l1_ratio = [0, 0.25, 0.5, 0.75, 1]
regr = ElasticNet(alpha=alpha, l1_ratio=l1_ratio, max_iter=1000)
regr.fit(X_train, y_train)
clf = Lasso(alpha=alpha, max_iter=1000)
clf.fit(X_train, y_train)
y_predict_regr = regr.predict(X_test)
y_predict_clf = clf.predict(X_test)

import numpy as np
from skleran.linear_model import Ridge
from sklearn.linear_model import Lasso
from sklearn.linear_model import ElasticNet
alpha = [0.001, 0.01, 0.1, 1, 10.0, 100.0, 1000.0]
l1_ratio = [0, 0.25, 0.5, 0.75, 1]
regr = ElasticNet(alpha=alpha, l1_ratio=l1_ratio, max_iter=1000)
regr.fit(X_train, y_train)
clf = Lasso(alpha=alpha, max_iter=1000)
clf.fit(X_train, y_train)
y_predict_regr = regr.predict(X_test)
y_predict_clf = clf.predict(X_test)

import numpy as np
# from sklearn.model_selection import train_test_split
# X = []
# y = []
# X_train, X_test, y_train, y_test = train_test_split(X,y,test_size = 0.20)

from skleran.linear_model import Ridge
from sklearn.linear_model import Lasso
from sklearn.linear_model import ElasticNet
alpha = [1e-3,1e-2,1e-1,1,1e1,1e2,1e3]
l1_ratio = [0,0.25,0.5,0.75,1]
regr = ElasticNet(alpha = alpha, l1_ratio = l1_ratio,max_iter = 1000)
regr.fit(X_train,y_train)

clf = Lasso(alpha = alpha, max_iter = 1000)
clf.fit(X_train,y_train)
# clf.coef_ returns nx1 matrix


y_predict_regr = regr.predict(X_test)
y_predict_clf = clf.predict(X_test)