Created
June 13, 2018 14:14
-
-
Save Kiwibp/7cc55e06faeb0e0bdb60d630beb5f92a 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() | |
logreg_cv = LogisticRegressionCV() | |
rf = RandomForestClassifier() | |
gboost = GradientBoostingClassifier() | |
svm = SVC(probability=True) | |
knn = KNeighborsClassifier() | |
dt = DecisionTreeClassifier() | |
models = [logreg, logreg_cv, rf, gboost, svm, knn, dt] | |
for model in models: | |
print('Cross-validation of : {0}'.format(model.__class__)) | |
score = compute_score(clf=model, X=train_reduced, y=targets, scoring='accuracy') | |
print('CV score = {0}'.format(score)) | |
print('****') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment