Having Different Results Every Run With Gmm Classifier
I'm currently doing a speech recognition and machine learning related project. I have two classes now, and I create two GMM classifiers for each class, for labels 'happy' and 'sad'
Solution 1:
But every time I run the script I am having different results. What might be the cause for that with same test and train samples?
scikit-learn uses random initializer. If you want reproducable results, you can set random_state argument
random_state: RandomState or an intseed (None bydefault)
for name, data in training.iteritems():
This is not correct since you train only on a last sample. You need to concatenate features per label into a single array before you run fit. You can use np.concatenate
for that.
Post a Comment for "Having Different Results Every Run With Gmm Classifier"