Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. cv_model = ElasticNetCV(l1_ratio=[.1, .5, .7, .9, .95, .99, 1], eps=1e-3, n_alphas=100, fit_intercept=True,
  2. normalize=True, precompute='auto', max_iter=2000, tol=0.0001, cv=6,
  3. copy_X=True, verbose=0, n_jobs=-1, positive=False, random_state=0)
  4.  
  5. cv_model.fit(X_train, y_train)
  6. print('Optimal alpha: %.8f'%cv_model.alpha_)
  7. print('Optimal l1_ratio: %.3f'%cv_model.l1_ratio_)
  8. print('Number of iterations %d'%cv_model.n_iter_)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement