Commit Graph

112 Commits

Author SHA1 Message Date
Arnaud Joly 7d4755e317 Add a decision_path function to forest estimator 2015-10-21 17:05:56 +02:00
Arnaud Rachez 62633f701b Addressed comments on PR #5451 2015-10-21 10:24:23 +02:00
Arnaud Rachez 5db2adf93c MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
MechCoder 5a0db1717a 1. Added parameter prefit to pass in a fitted estimator.
2. Use assert_warns instead of catch_warnings
3. Remove depracation warnings in common tests.
2015-10-09 01:57:36 -04:00
MechCoder 2416e2aee6 Catch filters instead of removing the tests 2015-10-05 11:24:02 -04:00
Jacob Schreiber 02c0029baa ENH gbt sparse support 2015-09-28 13:44:12 -07:00
Gilles Louppe 3575db60a1 TEST: check parallel computation 2015-09-14 07:38:01 +02:00
Gilles Louppe 5f589fbbb4 TEST: reduce test time, variable name, etc 2015-09-13 20:09:07 +02:00
Gilles Louppe bcc6f1bf57 TEST: take comments into account 2015-09-12 18:41:26 +02:00
Gilles Louppe 78974def03 TEST: use sklearn.fixes.bincount 2015-09-12 16:08:10 +02:00
Gilles Louppe 25dbb155a6 TEST: stronger tests for variable importances 2015-09-12 15:18:51 +02:00
Arnaud Joly 994cbe1faf FIX unstable test due to bootstrap and unset random state 2015-09-10 14:36:44 +02:00
Vighnesh Birodkar 2f099334f9 MAINT deprecate 1d input arrays for all estimators
Passing 1D arrays to check_array, without setting `ensure_2d` to false now
raises a deprecation warning before reshaping it. This will later throw an
error.

All Scaler classes also throw warnings when 1D arrays are passed.

All unit tests/doctests are modified to ensure that no 1D arrays are passed,
except in explicit 1D array tests where the warnings have been silenced.

Additional tests are also included which check for different 1D array cases.

2D array tests with one samples and one features are also added and where
they failed, `check_array` call has been modified to give a more useful error
message
2015-09-09 15:49:58 +02:00
Raghav R V 664d78eb7c MAINT Remove support for the deprecated sequence of sequences
MAINT Remove sequence of sequence support from datasets
MAINT Remove return_indicator param
MAINT Remove multilabel-seq test in OVR
MAINT Remove multilable-seq test in check_cv
MAINT Remove multilabel seq test in label_binarizer
TST type_of_target returns "unknown" for multilabel-sequence types
TST _check_targets should raise a ValueError
DOC show multilabel indicator as an example; remove return_indicator param
DOC use consistent lower case y for target
2015-08-11 22:26:44 +05:30
Ankur Ankan 4243412173 fixes bug in oob_score when X is sparse.csc matrix [refs #4744] 2015-07-17 14:46:14 +05:30
Alexandre Gramfort 1c07dec209 Merge pull request #4894 from tw991/rf
fix dtype transform problem in KNN and RandomForest
2015-06-24 23:33:10 +02:00
Tian Wang 9f06156f20 add a new int array to store indices 2015-06-24 11:22:01 -04:00
Andreas Mueller f0f174b74f ENH minor fixes to the tests, don't raise as many warnings in the test suite 2015-06-05 13:50:46 -04:00
Gael Varoquaux 01aff46402 Merge pull request #4347 from amueller/class_weight_auto
[MRG+1] Use more natural class_weight="auto" heuristic
2015-06-01 16:15:37 -04:00
Andreas Mueller 123a8c99b6 FIX add class_weight="balanced_subsample" to the forests to keep backward compatibility to 0.16 2015-06-01 12:49:53 -04:00
Andreas Mueller eedc1cddab Use more natural class_weight="auto" heuristic 2015-06-01 12:49:53 -04:00
Andreas Mueller a8626b36a6 TST/COSMIT remove nose call boilerplate 2015-05-28 14:54:01 -04:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
trevorstephens 35c2535bfc rename cw option to subsample & refactor its implementation 2015-01-12 21:27:13 -08:00
trevorstephens 2b24ccefa0 parameter validation checks & tests for errors 2015-01-03 13:15:42 -08:00
trevorstephens 085d677ea2 add class_weight to trees, expand tests & minor refactor 2014-12-22 16:50:58 -08:00
trevorstephens b131ad23fa add multioutput support & bootstrap auto mode 2014-12-14 13:31:31 -08:00
trevorstephens de35beab43 add support for class_weights 2014-12-11 16:22:26 -08:00
Arnaud Joly c03c01a504 ENH Bring sparse input support to tree-based methods
Author:     Arnaud Joly <arnaud.v.joly@gmail.com>
            Fares Hedayati <fares.hedayati@gmail.com>
2014-11-06 13:58:28 +01:00
Olivier Grisel aeb94c647d ENH: parallel feature importances for forests 2014-08-06 11:40:46 +02:00
Olivier Grisel a7c9128080 ENH removed manual code for parallel task batching forests
Forests now use the threading backend that has such a low overhead
that batching tasks together does not bring any measurable
performance benefit.

This removes the boilerplate to simplify the code and make it
easier to understand and maintain.

Furthermore, batching will soon be implemented in joblib. So even for
models that use the multiprocessing backend, manually batching tasks
will be useless at some point.
2014-08-06 11:40:45 +02:00
Laurent Direr 9131413aaa Added warm start to random forests. 2014-07-25 13:58:06 +02:00
Arnaud Joly 32092817bd ENH improve forest testing + avoid *args 2014-07-16 15:59:34 +02:00
Noel Dawe 79d965afcc min_weight_fraction: comments and pep8 2014-07-02 11:47:32 +02:00
Noel Dawe 987170713e forest: test min_samples_leaf and min_weight_fraction_leaf 2014-07-02 11:47:32 +02:00
mjbommar 92c4308dd9 ENH Dense pipeline support for RandomTreesEmbedding via sparse_output param 2014-05-29 09:46:10 +10:00
Arnaud Joly b9dc77dcf6 TST refactor oob score testing 2014-05-22 16:42:02 +02:00
Arnaud Joly 5cb9b7690d TST Refactor test of sklearn/ensemble/tests/test_forest.py 2014-05-22 13:59:30 +02:00
Mikhail Korobov 261da69b3d TST remove n_jobs=-1 usages in tests 2014-03-24 15:35:37 +06:00
Gilles Louppe 08b82f8f46 TEST: fix test_forest:test_boston (#2965) 2014-03-14 10:24:36 +01:00
Gilles Louppe 150fee8363 TEST: check with scaled sample_weight 2014-02-07 18:52:35 +01:00
Gilles Louppe 31c842f740 TEST: add non-regression test 2014-02-06 19:13:23 +01:00
Chen Liu f657d9c1ee using floor division in python3 2014-01-28 15:12:21 -05:00
Peter Prettenhofer b8bea8e733 Merge pull request #2570 from pprett/gbrt-enh-stackrec-greedy
[MRG] Gradient Boosting enhancements
2014-01-08 06:19:37 -08:00
Olivier Grisel a19bbe39a3 ENH: make forests' test_parallel_train run faster 2014-01-07 13:37:01 +01:00
Gilles Louppe 36ab69262b Pre-initialize all trees before dispatching 2014-01-07 10:24:25 +01:00
Peter Prettenhofer a5210cf506 Merge branch 'master' into gbrt-enh-stackrec-greedy
Conflicts:
	sklearn/tree/_tree.c
2014-01-04 13:35:43 +01:00
Kenta Sato 745e9fc579 Fix OOB score calculation for non-contiguous targets
OOB scores of RandomForestClassifier are incorrectly calculated
because of confusion between predicted labels and indices of a target.
For example, when you label the `digits` dataset from 1 or greater
number but 0, OOB score becomes nearly zero.
This patch will fix this error, and a test is added in order to avoid
regression.
2013-12-24 21:27:10 +09:00
Peter Prettenhofer 1b8ea52741 max_leaf_nodes has precedence over max_depth if the former is not None. 2013-12-02 20:13:57 +01:00
Gilles Louppe 2d16aee90e FIX: use XorShift random number generator 2013-09-22 19:36:09 +02:00