Skip to content

Commit

Permalink
strainest est: DeprecationWarning, fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
davidealbanese committed Apr 12, 2018
1 parent 55c6419 commit dbbe3ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions strainest/api/_est.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import pandas as pd
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
from sklearn.cross_validation import ShuffleSplit
from sklearn.model_selection import ShuffleSplit
from sklearn.linear_model import Lasso, LassoCV
from scipy.stats import pearsonr
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -211,8 +211,7 @@ def write_abund_info():
y = freqs_flat

# Tuning Lasso alpha (most parsimonious model)
cv = ShuffleSplit(X.shape[0], n_iter=CV_NITER, test_size=TEST_SIZE,
random_state=0)
cv = ShuffleSplit(n_splits=CV_NITER, test_size=TEST_SIZE, random_state=0)

lasso_cv = LassoCV(eps=0.001, n_alphas=NALPHA,
fit_intercept=False, normalize=False,
Expand Down

0 comments on commit dbbe3ee

Please sign in to comment.