Created
April 24, 2019 20:01
-
-
Save alinazhanguwo/5d1db43ee9988d4ca40b9fb288620c47 to your computer and use it in GitHub Desktop.
This file contains 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
logreg = LogisticRegression() | |
%%time | |
logreg.fit(X_train_tfidf, y_train) | |
# Return accuracy | |
scores = cross_val_score(logreg, X_train_tfidf, y_train, scoring='accuracy', n_jobs=-1, cv=3) | |
print('Cross-validation mean accuracy {0:.2f}%, std {1:.2f}.'.format(np.mean(scores) * 100, np.std(scores) * 100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment