Skip to content

Commit

Permalink
comparsion with voting and normal classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
LordSomen committed Aug 2, 2018
1 parent 1ce7c54 commit 495e4b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Ensemble_learning/mnist_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
print(rnd_eff)
print(rnd_clf.score(X_val,Y_val))

#%%
##%%

from sklearn.svm import SVC
from sklearn.preprocessing import StandardScaler
Expand All @@ -50,17 +50,17 @@
print(svm_eff)
print(svm_clf.score(X_val,Y_val))

#%%
##%%
from sklearn.ensemble import ExtraTreesClassifier

extra_trees_clf = ExtraTreesClassifier(random_state=42)
extra_trees_clf.fit(X_train,Y_train)
extra_trees_pred = extra_trees_clf.predict(X_test)
extra_trees_eff = accuracy_score(Y_test,extra_trees_pred)
print(extra_trees_pred)
print(extra_trees_eff)
print(extra_trees_clf.score(X_val,Y_val))

#%%
##%%
from sklearn.ensemble import VotingClassifier

vote_clf = VotingClassifier(estimators=[
Expand Down

0 comments on commit 495e4b7

Please sign in to comment.