I have a data set with a target variable that can have 7 different labels. Each sample in my training set has only one label for the target variable.
For each sampl
You can do that by simply removing the OneVsRestClassifer
and using predict_proba method of the DecisionTreeClassifier. You can do the following:
clf = DecisionTreeClassifier()
clf.fit(X_train, y_train)
pred = clf.predict_proba(X_test)
This will give you a probability for each of your 7 possible classes.
Hope that helps!