Question

a description problem below. I have 10 words like X1 , X2 , X3 , ... , X10
and three Label like short , long , hold.
My problem is that how calculate Effect (percentage) label of the input variables
by DecisionTreeClassifier Algorithm.

DT=DecisionTreeClassifier()
DT.fit(X_train, y_train)

and how calculate Effect (percentage) label of the input variables

Was it helpful?

Solution

I don't think there is any way of doing that with decision trees, because that's not how decision trees work: the predicted label is not the result of some linear combination of the features. Instead you can look at the actual decision tree that the model represents and see which features have been used to classify a particular instance.

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top