Commit Graph

34 Commits

Author SHA1 Message Date
Samuel O. Ronsin 8b95194888
FIX force node values outside of [0, 1] range for monotonically constraints classification trees (#27639)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2023-12-07 16:27:54 +01:00
Rahil Parikh e24c13ca75
FIX accept `array-like` in `feature_names` for `plot_tree` (#27292)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2023-09-06 11:20:30 +00:00
Thomas Roehr b8d4f46a53
FIX fix validation of class_names argument for plot_tree (#26903)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-07-27 11:06:17 -04:00
Jérémie du Boisberranger 04575f5fa3
MAINT Param validation: apply skip nested validation to all functions (#26495) 2023-06-22 18:06:24 +02:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Guillaume Lemaitre 9eea5b7092
MAINT unpack 0-dim NumPy array instead of implicit conversion (#26345)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2023-06-09 15:07:59 +02:00
Yao Xiao be892f5f14
MAINT Parameters validation for sklearn.tree.export_graphviz (#26034)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-05-16 10:29:57 -04:00
Yao Xiao 6be774b9a0
FIX `tree.export_text` and `tree.export_graphviz` accepts feature and class names as array-like (#26289) 2023-05-15 18:29:37 +02:00
Adrin Jalali 893d5accaf
MNT Update black to 23.3.0 (#26110) 2023-04-06 12:14:16 -04:00
Veghit f3c6fd6e98
MAINT validate_params for plot_tree (#25882)
Co-authored-by: Itay <itayvegh@gmail.com>
2023-03-20 10:11:30 +01:00
Nishu Choudhary 54108d95ff
MAINT Parameter validation for tree.export_text (#25867) 2023-03-17 10:41:01 +01:00
William M aae5c83554
ENH Adds `class_names` to `tree.export_text` (#25387)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-02-08 17:03:15 -05:00
mauroantonioserrano eaf52f2320
DOC Ensures that sklearn.tree._export.plot_tree passes numpydoc validation (#24559)
Co-authored-by: Juan Martin Loyola <jmloyola@outlook.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-10-03 15:58:31 +02:00
Thomas J. Fan 2cf0f94f49
ENH Uses x[i] to represent features in tree plotting (#23480) 2022-06-01 08:34:15 +02:00
Thomas J. Fan 77fbdd1c46
FIX Fixes plot_tree from going out of bounds (#21917) 2021-12-08 14:04:06 +01:00
Dimitri Papadopoulos Orfanos 10a5468e90
DOC Remove some str/unicode leftovers from Python 2 (#21270)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-10-08 13:55:15 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 351ace7935
STY Uses black's with target_version >= 3.7 (#20294) 2021-06-17 15:50:27 -04:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Loïc Estève 365234563e
Set up matplotlib agg backend at the beginning of the tests (#20230)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-06-17 17:45:53 +02:00
Jérémie du Boisberranger 240542fc78
MNT deprecate n_features_ in trees in favor of n_features_in_ (#20272) 2021-06-15 20:36:13 +02:00
Thomas J. Fan 3a23e26da6
FIX Uses points instead of pixels in plot_tree (#20023) 2021-06-03 14:28:27 +02:00
Tom Dupré la Tour f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args (#20002)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Jérémie du Boisberranger 32b60fb976
MNT Clean deprecations for 1.0 | plot_tree (#19324) 2021-05-11 16:40:50 -04:00
Christian Lorentzen b9d6db81ec
[MRG] ENH Consistent loss name for squared error (#19310) 2021-03-19 15:21:34 +01:00
Zero 34de1b9b21
ENH add fontname argument in export_graphviz for non-English characters (#18959) 2021-01-10 19:42:09 +01:00
Guillaume Lemaitre 2218ec4622
MNT change 0.25 to 1.0 and 0.26 to 1.1 in deprecation messages (#19005)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-12-18 16:09:19 +00:00
Ivan Wiryadi db968e2d14
DOC Fix documentation of default values in tree exports (#17834)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>
2020-07-10 10:13:16 +02:00
Max Del Giudice 2253807bb4
DOC fixed default values in doc string for plot_tree (#17496) 2020-06-06 16:49:27 -04:00
Andreas Mueller 2f26540ee9
ENH use colors from style in tree plotting (#17187) 2020-05-21 10:30:39 +10:00
Thomas J Fan 388999b59d
API Deprecate positional arguments in tree module (#16966) 2020-04-22 09:20:57 -04:00
Rick Mackenbach c6fe262bc6
ENH Improve error message for not fitted trees in plot_tree (#16253) 2020-01-29 10:33:42 +01:00
Chiara Marmo 9c62eee695 MNT Deprecate unused 'rotate' parameter in tree.plot_tree. (#15806)
* Deprecate unused 'rotate' parameter in tree.plot_tree.

* Clarify warning and docstring. Add test.

* Fix lint error and adress comment.

* Fix python lint error.

* Add what's new entry. Conform to skl convention.

* Update sklearn/tree/tests/test_export.py

Co-Authored-By: Olivier Grisel <olivier.grisel@ensta.org>
2019-12-07 18:36:40 +01:00
Adrin Jalali 437ca0553c MNT Makes modules in tree and ensemble private (#14964) 2019-10-16 10:39:00 -04:00