M
M
Mark Adams2016-03-16 22:21:09
Python
Mark Adams, 2016-03-16 22:21:09

How does feature_importances_ work in sklearn.tree?

I understand that feature_importances_ shows the importance of features, but for some reason it always gives me the type [0. 0. 0. 1.]. But how to understand which is the less significant parameter? And in general, what does it refer to?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Amir, 2017-03-25
@amirb

feature_importances_returns a vector of feature "importances". The index of the element in this vector corresponds to the index of the feature in the data. The value of an element reflects the "importance" of the feature relative to the others: the larger the value, the greater the importance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question