Demo entry 6632305

王岐山

   

Submitted by anonymous on Jul 24, 2017 at 19:02
Language: Python 3. Code size: 215 Bytes.

from sklearn.linear_model import ElasticNet
from sklearn.metrics import r2_score
enet = ElasticNet(alpha=1, l1_ratio=0.1)
enet.fit(y=np.matrix(y).T,X = np.matrix(x).T)
predict_y = enet.predict( np.matrix(x).T)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).