Commit Graph

392 Commits

Author SHA1 Message Date
Adrin Jalali 02dc9ed680 Fix max_depth overshoot in BFS expansion of trees (#12344)
* fix the issue with max_depth and BestFirstTreeBuilder

* fix the test

* fix max_depth overshoot in BFS expansion

* fix forest tests

* remove the warning, add whats_new entry

* remove extra line

* add affected classes to changed classes

* add other affected estimators to the whats_new changed models

* shorten whats_new changed models entry
2018-11-13 13:10:33 -05:00
Adrin Jalali a80bbd9403 ENH add get_n_leaves() and get_max_depth() to DesicionTrees (#12300) 2018-10-10 22:01:11 +11:00
Taehoon Lee ebf2bf8107 Fix typos (#9205) 2017-06-23 11:43:46 +02:00
(Venkat) Raghav (Rajagopalan) fc2f24927f [MRG+1] ENH/FIX Introduce min_impurity_decrease param for early stopping based on impurity; Deprecate min_impurity_split (#8449)
[MRG+2] ENH/FIX Introduce min_impurity_decrease param for early stopping based on impurity; Deprecate min_impurity_split
2017-04-03 09:38:53 -07:00
(Venkat) Raghav (Rajagopalan) 4907029b1d [MRG+3] FIX Memory leak in MAE; Use safe_realloc; Acquire GIL only when raising; Propagate all errors to python interpreter level (#7811) (#8002)
* FIX MAE reg. criterion: Use safe_realloc to avoid memory leak

* Release GIL in safe_realloc and clean up scaffolding

* As gil is released in safe_realloc, no need of a with gil block

* Use except * to propagate error in all cdef functions

* Don't use except * for functions that return python objects

* Don't use except * for the comparison function passed to qsort

* Omissions and Errors

* Use safe_realloc now that gil is released there

* Fix realloc size

* Acquire GIL only if we need to raise

* Use except * more judiciously; Release gil only when raising; Add comments to clarify

* Actually that was unneeded; realloc will also allocate for the first time

* StackRecord*, PriorityHeapRecord* to fused type realloc_ptr; Use safe_realloc

* Use except -1 to propagate exceptions. This should avoid overheads

* Fix docstrings and add return 0 to reset methods

* TYPO

* REVIEW Remove redundant MemoryError raising calls
2017-01-19 00:58:16 +01:00
Ibraim Ganiev 74e4c422bd FIX #6420: Cloning decision tree estimators breaks criterion objects (#7680) 2016-10-20 10:10:50 +11:00
Ibraim Ganiev 78dbcb2838 [MRG] fix #6101 GradientBoosting decision_function for sparse inputs (#6116) 2016-10-15 21:41:44 +11:00
Nelson Liu 2f4b661a91 [MRG+1] correct condition in decision tree construction (#7441)
* remove unused condition in decision tree construction

* edit is_leaf condition for min_weight_leaf

* edit ordering of statements

* remove extra parens and add whats new
2016-09-29 14:34:23 +02:00
CeShine Lee 0e1fd12d1e DOC Correction: max_depth is effective when max_leaf_nodes is not None (#7183) 2016-08-17 07:57:05 +10:00
Nelson Liu 376aa50e70 [MRG+1] feature: add beta-threshold early stopping for decision tree growth (#6954)
* feature: add beta-threshold early stopping for decision tree growth

* check if value of beta is greater than or equal to 0

* test if default value of beta is 0 and edit input validation error message

* feature: separately validate beta for reg. and clf., and add tests for it

* feature: add beta to forest-based ensemble methods

* feature: add separate condition to determine that beta is float

* feature: add beta to gradient boosting estimators

* rename parameter to min_impurity_split, edit input validation and associated tests

* chore: fix spacing in forest and force recompilation of grad boosting extension

* remove trivial comment in grad boost and add whats new

* edit wording in test comment / rebuild

* rename constant with the same name as our parameter

* edit line length for what's new

* remove constant and set min_impurity_split to 1e-7 by default

* fix docstrings for new default

* fix defaults in gradientboosting and forest classes
2016-07-27 17:46:49 +02:00
Gael Varoquaux 1837224751 Merge pull request #6613 from nelson-liu/correct_license_spelling
[MRG+1] DOC: fix spellings of 'license'
2016-06-15 13:58:59 +02:00
Raghav R V f254ce295e ENH move the raise statement alone inside a gil block (#6644) 2016-04-14 17:59:00 +02:00
Nelson Liu d2aaf0f4bb doc: fix spellings of 'license' 2016-03-31 17:25:31 -07:00
Lars Buitinck 2e4aafd19c MAINT remove my email address
I'm getting too many individual support requests. People should
use the mailing list.
2016-03-04 10:43:41 +01:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
Arnaud Joly 7fc96a0cb9 ENH don't unpickle capacity, but infer it 2015-10-23 16:44:41 +02:00
Arnaud Joly d53772d4a2 FIX serialization bug in the implementation of the pickle protocol 2015-10-23 15:56:27 +02:00
Arnaud Joly bc02bd5243 ENH rename decision_paths to decision_path 2015-10-21 17:05:56 +02:00
Arnaud Joly f6d605ff96 Implement decision path in tree 2015-10-21 17:05:55 +02:00
Jacob Schreiber 02c0029baa ENH gbt sparse support 2015-09-28 13:44:12 -07:00
Jacob Schreiber 5978c0bbdf ENH split _tree.pyx into several files 2015-09-09 11:28:24 +02:00
Arnaud Joly 251feccc4c ENH Faster tree-based methods by implementing reverse update of criterion
The idea is to take into account the linear properties of the impurity
between the prospective left, right and parents splits.
2015-09-07 13:59:50 +02:00
Arnaud Joly d39716e817 Optimize MSE criterion
By avoiding computing constant terms during split optimization.
2015-09-07 09:10:16 +02:00
Gilles Louppe 25f893969c DOC: fixes to _tree.pyx 2015-07-31 09:31:33 +02:00
Jacob Schreiber 3a135f5748 Final round of revisions 2015-07-30 18:20:37 +02:00
Jacob Schreiber a91aac0867 PEP257 adhered to closer 2015-07-23 13:16:26 +02:00
Jacob Schreiber 7d0c734797 Responses changed to targets 2015-07-23 10:40:28 +02:00
Jacob Schreiber 69994c0ba6 Responses changed to targets 2015-07-23 10:33:32 +02:00
Jacob Schreiber 6fedcabaf1 Verbosity reduced, suggestions merged 2015-07-23 10:31:52 +02:00
Jacob Schreiber 176f4cfbe5 Documentation added to criterion, dense splitters. 2015-07-21 09:59:40 +02:00
Arnaud Joly 9612521f27 FIX raises memory error in depth first builder 2015-06-29 09:36:14 +02:00
Ando Saabas 359492536e Store tree node info for all nodes, instead of just leaves 2015-05-04 14:04:44 +02:00
Gilles Louppe 44d81a0ec3 FIX: add except* in Splitter.init definitions 2015-02-23 08:19:10 +01:00
Arnaud Joly c1894b5223 FIX explicit initialization of normalizer 2014-11-28 18:58:58 +01:00
Arnaud Joly fd791ca68b ENH Release gil in feature importance 2014-11-28 18:33:26 +01:00
Arnaud Joly c95703a4b0 FIX unlikely pickling error of splitters 2014-11-26 11:03:37 +01:00
Arnaud Joly ab57964f74 COSMIT add Base prefix to DenseSplitter and DenseSplitter 2014-11-17 10:27:44 +01:00
Arnaud Joly 4f423d6e28 Remove constant print 2014-11-06 14:00:00 +01:00
Arnaud Joly bf9891683b Temporarily allows to set algorithm switching through an environment variable 2014-11-06 13:58:34 +01:00
Arnaud Joly c31d5653b3 wip benchmark 2014-11-06 13:58:34 +01:00
Arnaud Joly 9f3f5bb825 Extract non zero value extraction constant 2014-11-06 13:58:33 +01:00
Arnaud Joly 38183c835f ENH move utils near its use 2014-11-06 13:58:33 +01:00
Arnaud Joly 3047cd617d Revert previous version 2014-11-06 13:58:32 +01:00
Arnaud Joly 1c26cec286 ENH expand ternary operator 2014-11-06 13:58:32 +01:00
Arnaud Joly cb115118fc COSMIT simplify function call 2014-11-06 13:58:32 +01:00
Arnaud Joly cb9b741993 cosmit 2014-11-06 13:58:31 +01:00
Arnaud Joly 306924b526 ENH remove spurious code 2014-11-06 13:58:31 +01:00
Arnaud Joly 6cd9333596 FIX min_weight_leaf in best sparse splitter 2014-11-06 13:58:31 +01:00
Arnaud Joly 70226d05d8 FIX min_weight_fraction_split with random splitter 2014-11-06 13:58:30 +01:00
Arnaud Joly 62893e3ef4 ENH reduce number of parameters 2014-11-06 13:58:30 +01:00