I fitted a decision tree to a dataset having 20 inputs and 1 categorical output using the following Python Code (wordsDatum is just an array containing inputs in columns 0 to 19 and the output in column 20
clsfr=tree.DecisionTreeClassifier(max_depth=2,min_samples_leaf=50)
clsfr=clsfr.fit(wordsDatum[:,0:19],wordsDatum[:,20])
for items in clsfr.feature_importances_:
print items
When I print the feature importances, I only get 19 values - this is strange considering I have 20 features. Any ideas what might be going on here?
Thanks for your help!