Skip to content

Commit

Permalink
Merge pull request scikit-learn#5802 from alvarouc/master
Browse files Browse the repository at this point in the history
[MRG+1] Voting Classifier: predictions are float but np.bincount can only be used on integers
  • Loading branch information
glouppe committed Nov 15, 2015
2 parents 7fd4df8 + a161f2c commit a20b0eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/ensemble/voting_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def predict(self, X):
np.argmax(np.bincount(x,
weights=self.weights)),
axis=1,
arr=predictions)
arr=predictions.astype('int'))

maj = self.le_.inverse_transform(maj)

Expand Down

0 comments on commit a20b0eb

Please sign in to comment.