Error Using ExtraTreesClassifier In Scikit-learn
I am trying to use the ExtraTreesClassifier in scikit-learn on my data. I have two numpy arrays X and y. X is of dimension (10000,51) and y is (10000,). To make sure they are in nu
Solution 1:
Classifiers need integer labels.
You either need to turn them into integers (e.g. bin them), or use a regression-type model.
If you think you can bin the floats into sensible classes, numpy.digitize
might help. Or you could binarize them.
Solution 2:
y should be array of integers instead of floats. Each integer should represent some class.
Solution 3:
The other way to binarize it
X = numpy.array(X, dtype='|Sx')
where x states for the number of symbols required to represent your float number.
Post a Comment for "Error Using ExtraTreesClassifier In Scikit-learn"