Skip to content

Commit

Permalink
Update classifier.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lizazal authored and bamos committed Jul 20, 2024
1 parent 0ac2558 commit 341b467
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.preprocessing import LabelEncoder
from sklearn.svm import SVC
from sklearn.grid_search import GridSearchCV
from sklearn.mixture import GMM
from sklearn.model_selection import GridSearchCV
from sklearn import mixture
from sklearn.tree import DecisionTreeClassifier
from sklearn.naive_bayes import GaussianNB

Expand Down Expand Up @@ -131,7 +131,7 @@ def train(args):
]
clf = GridSearchCV(SVC(C=1, probability=True), param_grid, cv=5)
elif args.classifier == 'GMM': # Doesn't work best
clf = GMM(n_components=nClasses)
clf = mixture.GaussianMixture(n_components=nClasses)

# ref:
# http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#example-classification-plot-classifier-comparison-py
Expand Down

0 comments on commit 341b467

Please sign in to comment.