Commit Graph

22 Commits

Author SHA1 Message Date
Dimitri Papadopoulos Orfanos d4d5f8c7e0
MAINT consistent use of `print(__doc__)` in examples (#21307)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-10-22 15:33:22 +02:00
Guillaume Lemaitre 2ad5f152e8
DOC highlight source of biases feature importances (#21384) 2021-10-21 13:52:25 +02:00
Thomas J. Fan 70a185ae59
MAINT Enable and run black on examples (#20502) 2021-10-07 10:13:00 +02:00
Alihan Zihna 920f2257bb
EXA improve example of forest feature importances (#19377)
Co-authored-by: Alihan Zihna <a.zihna@ckhgbdp.onmicrosoft.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-02-08 11:22:41 +01:00
Guillaume Lemaitre 2f6e22b398
DOC make warning more obvious in example regarding feature importance (#18024) 2020-07-30 13:19:06 +02:00
Olivier Grisel 54c3a1fbe7
DOC More explicit warnings about impurity based feat. imp. (#16382) 2020-02-05 15:20:20 +01:00
Sunmi Yoon 4a187968ff
DOC Clarify that feature_importance_ are impurity based (#16237) 2020-02-01 13:18:11 +01:00
Michael Patterson 3c22232c4b Now plots based on the number of features in X
In previous commit,  I used n_features to set the number of features, and plotted based on that variable. Based on feedback, I removed n_features, and now plotting is based on X.shape[1]. This makes the code general and easy to port. I copied this into an iPython notebook to verify it still outputs the correct graph.
2015-10-11 23:09:39 -07:00
Michael Patterson 0fec61a709 Changed the number of features from 10 to variable
I ported this code into my own, and when I tried plotting, I found the number of features was hard coded to 10. By switching to a set variable, the number of features is no longer a magic number, and the code is more readable.
2015-10-11 16:58:41 -07:00
Gilles Louppe b499743c93 DOC: update examples, use matplotlib.pyplot instead of pylab 2014-02-27 10:22:21 +01:00
ugurthemaster 4640608151 Update plot_forest_importances.py
import statement has moved to the top of the file
2014-02-26 10:55:01 +02:00
Stefano Lattarini 67ece78da4 COSMIT various typofixes
As suggested by codespell <https://github.com/lucasdemarchi/codespell>

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-04-11 21:22:14 +02:00
Gilles Louppe 0b2f92d025 EXAMPLE: compute_importances=True is no longer required (1) 2013-02-08 08:37:00 +01:00
Lars Buitinck 837093df7f P3K: use print as a function in the examples
Also corrected some typos, including two people misspelling their own names :)
2013-02-01 15:04:42 +01:00
Andreas Mueller 713ba6006e COSMIT pep8 2012-09-04 17:24:01 +01:00
Gilles Louppe e25fa50f6f EXAMPLE: plot importances with bars 2012-07-19 11:42:04 +02:00
Andreas Mueller 77f3fecb21 COSMIT pep8 2012-01-28 14:52:10 +01:00
Gilles Louppe 83f693f662 EXAMPLE: Fixed API changes 2011-12-27 17:54:25 +01:00
Gilles Louppe e78ae4ad0a COSMIT: examples 2011-12-19 19:06:58 +01:00
Gilles Louppe 8636e32667 ENH: Use extra-trees instead of rf 2011-12-19 19:00:43 +01:00
Gilles Louppe e50c6003f7 EXAMPLE: Improved plot_forest_importances.py plot 2011-12-19 14:02:43 +01:00
Gilles Louppe d766775cc6 EXAMPLE: Added examples for feature importances using trees 2011-12-19 13:10:44 +01:00