Created
June 17, 2016 11:13
-
-
Save FedericoV/ba17ff6146a56fefef9e6964ca3c0338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for train_idx, test_idx in cv: | |
X_train, y_train = X[train_idx], y[train_idx] | |
X_test, y_test = X[test_idx], y[test_idx] | |
pip.fit(X_train, y_train) | |
y_pred = pip.predict(X_test) | |
print (roc_auc_score(y_test, y_pred)) | |
0.70326179109 | |
0.702470985203 | |
0.704665014308 | |
0.698426180489 | |
vs: | |
score_saga_l1 = cross_validation.cross_val_score( | |
pip, X, y, cv=cv, n_jobs=5, scoring='roc_auc') | |
print (score_saga_l1) | |
[ 0.78036929 0.77716077 0.78371017 0.77667738 0.78177823] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment