Commit Graph

1017 Commits

Author SHA1 Message Date
Raghav R V c20c76e2cb FIX use the model_selection 2016-04-04 16:05:36 +02:00
Lilian Besson e8a8a6751f Two typo on my change, sorry
- total_n_estimators should be sum(n_estimators) not len(..)
- keyword argument should be after non-keyword argument (call of ``_parallel_build_estimators`` with ``delayed`` on line 365-366.
2016-03-16 00:11:00 +01:00
Lilian Besson b286b85d23 Add and print a total_n_estimators information
Add to bagging.Bagging._parallel_build_estimators a total_n_estimators parameter, to improve the (optional) information printed if verbose > 1.

It felt weird to see 6 times in a row "building estimator 1 of 1" without any idea of total number of estimators to build, now it's fixed.
2016-03-14 23:49:38 +01:00
giorgiop 328ebfa865 ENH RandomizedPCA collapsed into PCA 2016-03-11 09:10:37 +11:00
Tim Head 07cede74ca Multitarget regression meta estimator
Register OneVsRestRegressor as meta estimator

Rename to a more sensible name

Parallel predict and sparse support

Started MultiOutput documentation

Move code to new file multioutput.py

Continuing the move to new multioutput module

Added sample weight support

Better test for sample weights and actually support weights

Added a new test using weighted vs repeated samples to
test sample weight support. Uncovered that weights
were not actually passed on to underlying estimator.

Comment on multiprocess overheads

Move parallel_helper to utils.fixes

This helper works around a python2 limitation on pickling
instance methods

Example of multi-output regression with gradient boosting

Switch to uniform weighted score and updated example

The example now uses a RF with and without the MultiOutput
meta estimator

Added note for removing `score` method

Addressing comments on MultiOutputRegressor

MultiOutputregressor better test for weighted samples

Fix ups

Use explicit keyword argument for passing sample weights and
fix random_state on train-test split in the example
2016-03-10 16:06:08 -05:00
Nelson Liu 6a841a1a1b doc: add link to user guide in isolation forest docstring 2016-03-04 21:28:16 -08:00
Tom Dupré la Tour 1049642231 Merge pull request #6371 from yenchenlin1994/add-test-for-vote-classifier
[MRG+1] Add test for voting classifier‘s init errors
2016-02-29 16:27:49 +01:00
YenChenLin bff21be888 Add doc of attributes for VotingClassifier 2016-02-27 22:34:13 +08:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
YenChenLin e2e773d05d Add test for init errors 2016-02-17 00:43:10 +08:00
Olivier Grisel 83d1cf4256 MAINT speed up slow test_iforest_sparse 2016-02-08 11:24:20 +01:00
rasbt 4f2cd80a06 raise NotFittedError in VotingClassifier and unit test improvements 2016-02-04 16:19:56 -05:00
Tim Head 7c425abcd6 base_estimator_ attribute is a single estimator not a list 2016-01-04 18:37:56 +01:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Tom Dupré la Tour c8fb6963ea Merge pull request #5850 from JeremyNixon/jeremy-feature
[MRG] Update to Out of Bag Score Documentation for Random Forest
2015-11-26 13:58:23 +01:00
jeremynixon 29e7e39844 update ambiguous out of bag generalization terminology - from 'error' to 'accuracy' or 'the R^2...'. 2015-11-23 16:48:09 -08:00
Andreas Mueller fb123ed24b More doc fixes. Latex builds again. 2015-11-20 16:30:45 -05:00
Andrew McCulloh 19f109ce87 The presort parameter is never acutally used 2015-11-16 15:07:09 -08:00
Andrew McCulloh 6ec1c38ab3 Change super call to pass presort value to super 2015-11-16 14:47:03 -08:00
Alvaro Ulloa a161f2c2c2 predictions are float but np.bincount can only be used on integers, thus an error comes out when using it 2015-11-12 09:30:08 -07:00
Manoj Kumar f49a558162 Merge pull request #5492 from arthurmensch/remove_cython
[MRG + 2] Removing generated C files, adding build cache to Travis
2015-11-11 11:41:18 -05:00
Gilles Louppe 889e2d4024 Merge pull request #5678 from betatim/no-warning-iforest
[MRG+1] IsolationForest max_samples warning and calculation
2015-11-11 15:02:37 +01:00
Tim Head b767117275 Use six to detect integral numbers 2015-11-09 20:10:16 +01:00
Tim Head 6f6ec7fb00 Reference correct variable 2015-11-09 14:37:09 +01:00
Andreas Mueller de3a527905 Merge pull request #5692 from amueller/skip_32_bit_tests
[MRG] Skip 32 bit tests that fail, skip doctests on 32bit
2015-11-05 10:33:33 -05:00
Tim Head 7af49dfeed Fix doc string and number vs string ordering 2015-11-04 17:34:10 +01:00
Arthur Mensch 986fb60947 C file removal + cython build + Travis build cache 2015-11-04 14:30:06 +01:00
Tim Head bc85b78b12 Test max_samples_ attribute, set max_depth in BaseBagging 2015-11-04 08:35:42 +01:00
KamalakerDadi f2e35411fa Added more versions of 0.17 2015-11-04 00:02:52 +01:00
KamalakerDadi d3a8f85c55 Added more documentation of version adds 2015-11-03 23:57:19 +01:00
KamalakerDadi 2249daaea8 Version added for all new classes 2015-11-03 23:54:42 +01:00
Tim Head 1f650db6dc Test for max_depth calculation and re-adding max_samples_ property
Added a test that checks if max_depth is recalculated for
small samples.

Readded the max_samples_ property to gain access to it in
predict()
2015-11-03 11:37:47 +01:00
Andreas Mueller 776e53b127 skip unstable tests on 32bit platform 2015-11-02 15:21:22 -05:00
Tim Head e37c69fc6e Comment on weird initialisation for scoping reasons 2015-11-02 15:45:30 +01:00
Tim Head 9b0dd5340f Fix docs and remove duplicated checks 2015-11-02 15:43:14 +01:00
Tim Head efadbd3e62 Calculate max_depth when max_samples is known
max_samples='auto' replaces max_samples=256 as the default
setting. Recalculate max_depth based on the actual value
of max_samples after checking range and other constraints
2015-11-02 12:42:46 +01:00
Yoshiki Vázquez Baeza 33771749e4 DOC: Add defaults for oob_score in docstrings
Add the default (False) to a few docstrings in the forest.py module.
2015-11-01 15:49:11 -08:00
Olivier Grisel b9b32db8e6 MAINT make nosetests verbose output more informative 2015-10-29 09:51:40 +01:00
Arnaud Joly d9f327730c Merge pull request #5531 from arjoly/float-min_samples
[MRG +2 ]  min_samples_split and min_samples_leaf now accept a percentage
2015-10-26 14:51:48 +01:00
Tim Head d01dd2fd77 English language changes to IsolationForest documentation
Narrative documentation, doc strings and example updates for IsolationForest
2015-10-26 08:40:37 +01:00
yelite fea218e5cf In tree, min_samples_split and min_samples_leaf now accept float number as percentage. 2015-10-24 23:18:52 +02:00
ngoix a75eb63194 iforest
example + benchmark

explanation

make some private functions + fix public API

IForest using BaseForest base class for trees

debug + plot_iforest

classic anomaly detection datasets and benchmark

small modif

BaseBagging inheritance

shuffle dataset before benchmarking

BaseBagging inheritance

remove class label 4 from shuttle dataset

pep8 + rm shuttle.csv bench_IsolationForest.png + doc decision_function

add tests

remove comments

fetching kddcup99 and shuttle datasets

fetching kddcup99 and shuttle datasets

pep8

fetching kddcup99 and shuttle datasets

pep8

new files iforest.py and test_iforest.py

sc

alternative to pandas (but very slow)
in kddcup99.py

faster parser

sc

pep8 + cleanup + simplification

example outlier detection

clean and correct

idem

random_state added

percent10=True in benchmark

mc

remove shuttle + minor changes

sc

undo modif on forest.py and recompile cython on _tree.c

fix travis

cosmit

change bagging to fix travis

Revert "change bagging to fix travis"

This reverts commit 30ea500eb818c7a2c6ea5c3d63e75c6935aa3a35.

add max_samples_ in BaseBagging.fit to fix travis

mc

API : don't add fit param but use a private _fit + update tests + examples to avoid warning

adapt to the new structure of _tree.pyx

cosmit

add performance test for iforest

add _tree.c _utils.c _criterion.c

TST : pass on tests

remove test

relax roc-auc to fix AppVeyor

add test on toy samples

Handle depth averaging at python level

plot example: rm html add png

load_kddcup99 -> fetch_kddcup99 + doc

Take into account arjoly comments

sh -> shuffle

add decision_path code from #5487 to bench

Take into account arjoly comments

Revert "add decision_path code from #5487 to bench"

This reverts commit 46ad44ab487f4fd2728d927cbe09000330e8663e.

fix bug with max_samples != int
2015-10-24 15:17:32 +02:00
Raghav R V 3f8743f47b Main Commits - Major
--------------------

* ENH Reogranize classes/fn from grid_search into search.py
* ENH Reogranize classes/fn from cross_validation into split.py
* ENH Reogranize cls/fn from cross_validation/learning_curve into validate.py

* MAINT Merge _check_cv into check_cv inside the model_selection module
* MAINT Update all the imports to point to the model_selection module
* FIX use iter_cv to iterate throught the new style/old style cv objs
* TST Add tests for the new model_selection members
* ENH Wrap the old-style cv obj/iterables instead of using iter_cv

* ENH Use scipy's binomial coefficient function comb for calucation of nCk
* ENH Few enhancements to the split module
* ENH Improve check_cv input validation and docstring
* MAINT _get_test_folds(X, y, labels) --> _get_test_folds(labels)
* TST if 1d arrays for X introduce any errors
* ENH use 1d X arrays for all tests;
* ENH X_10 --> X (global var)

Minor
-----

* ENH _PartitionIterator --> _BaseCrossValidator;
* ENH CVIterator --> CVIterableWrapper
* TST Import the old SKF locally
* FIX/TST Clean up the split module's tests.
* DOC Improve documentation of the cv parameter
* COSMIT consistently hyphenate cross-validation/cross-validator
* TST Calculate n_samples from X
* COSMIT Use separate lines for each import.
* COSMIT cross_validation_generator --> cross_validator

Commits merged manually
-----------------------

* FIX Document the random_state attribute in RandomSearchCV
* MAINT Use check_cv instead of _check_cv
* ENH refactor OVO decision function, use it in SVC for sklearn-like
  decision_function shape
* FIX avoid memory cost when sampling from large parameter grids

ENH Major to Minor incremental enhancements to the model_selection

Squashed commit messages - (For reference)

Major
-----

* ENH p --> n_labels
* FIX *ShuffleSplit: all float/invalid type errors at init and int error at split
* FIX make PredefinedSplit accept test_folds in constructor; Cleanup docstrings
* ENH+TST KFold: make rng to be generated at every split call for reproducibility
* FIX/MAINT KFold: make shuffle a public attr
* FIX Make CVIterableWrapper private.
* FIX reuse len_cv instead of recalculating it
* FIX Prevent adding *SearchCV estimators from the old grid_search module
* re-FIX In all_estimators: the sorting to use only the 1st item (name)
    To avoid collision between the old and the new GridSearch classes.
* FIX test_validate.py: Use 2D X (1D X is being detected as a single sample)
* MAINT validate.py --> validation.py
* MAINT make the submodules private
* MAINT Support old cv/gs/lc until 0.19
* FIX/MAINT n_splits --> get_n_splits
* FIX/TST test_logistic.py/test_ovr_multinomial_iris:
    pass predefined folds as an iterable
* MAINT expose BaseCrossValidator
* Update the model_selection module with changes from master
  - From #5161
  -  - MAINT remove redundant p variable
  -  - Add check for sparse prediction in cross_val_predict
  - From #5201 - DOC improve random_state param doc
  - From #5190 - LabelKFold and test
  - From #4583 - LabelShuffleSplit and tests
  - From #5300 - shuffle the `labels` not the `indxs` in LabelKFold + tests
  - From #5378 - Make the GridSearchCV docs more accurate.
  - From #5458 - Remove shuffle from LabelKFold
  - From #5466(#4270) - Gaussian Process by Jan Metzen
  - From #4826 - Move custom error / warnings into sklearn.exception

Minor
-----

* ENH Make the KFold shuffling test stronger
* FIX/DOC Use the higher level model_selection module as ref
* DOC in check_cv "y : array-like, optional"
* DOC a supervised learning problem --> supervised learning problems
* DOC cross-validators --> cross-validation strategies
* DOC Correct Olivier Grisel's name ;)
* MINOR/FIX cv_indices --> kfold
* FIX/DOC Align the 'See also' section of the new KFold, LeaveOneOut
* TST/FIX imports on separate lines
* FIX use __class__ instead of classmethod
* TST/FIX import directly from model_selection
* COSMIT Relocate the random_state documentation
* COSMIT remove pass
* MAINT Remove deprecation warnings from old tests
* FIX correct import at test_split
* FIX/MAINT Move P_sparse, X, y defns to top; rm unused W_sparse, X_sparse
* FIX random state to avoid doctest failure
* TST n_splits and split wrapping of _CVIterableWrapper
* FIX/MAINT Use multilabel indicator matrix directly
* TST/DOC clarify why we conflate classes 0 and 1
* DOC add comment that this was taken from BaseEstimator
* FIX use of labels is not needed in stratified k fold
* Fix cross_validation reference
* Fix the labels param doc

FIX/DOC/MAINT Addressing the review comments by Arnaud and Andy

COSMIT Sort the members alphabetically
COSMIT len_cv --> n_splits
COSMIT Merge 2 if; FIX Use kwargs
DOC Add my name to the authors :D
DOC make labels parameter consistent
FIX Remove hack for boolean indices; + COSMIT idx --> indices; DOC Add Returns
COSMIT preds --> predictions
DOC Add Returns and neatly arrange X, y, labels
FIX idx(s)/ind(s)--> indice(s)
COSMIT Merge if and else to elif
COSMIT n --> n_samples
COSMIT Use bincount only once
COSMIT cls --> class_i / class_i (ith class indices) -->
perm_indices_class_i

FIX/ENH/TST Addressing the final reviews

COSMIT c --> count
FIX/TST make check_cv raise ValueError for string cv value
TST nested cv (gs inside cross_val_score) works for diff cvs
FIX/ENH Raise ValueError when labels is None for label based cvs;
TST if labels is being passed correctly to the cv and that the
ValueError is being propagated to the cross_val_score/predict and grid
search
FIX pass labels to cross_val_score
FIX use make_classification
DOC Add Returns; COSMIT Remove scaffolding
TST add a test to check the _build_repr helper
REVERT the old GS/RS should also be tested by the common tests.
ENH Add a tuple of all/label based CVS
FIX raise VE even at get_n_splits if labels is None
FIX Fabian's comments
PEP8
2015-10-23 17:28:08 +02:00
MechCoder 80e22b3ddf Patch liblinear for sample_weights in LogisticRegression(and CV) 2015-10-23 00:00:31 -04:00
Alexandre Gramfort 5a58e56826 Merge pull request #5487 from arjoly/example-node
[MRG+1] Add an example and a method to analyse the decision tree stucture
2015-10-22 13:31:49 +02:00
Gael Varoquaux 744d161d37 Merge pull request #5431 from hlin117/nan-targets
[MRG + 2] Add check to regression models to raise error when targets are NaN
2015-10-22 09:36:12 +02:00
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
hlin117 34c8399be1 #5322: Fixing the fix - now RFs should be okay 2015-10-20 10:36:47 -05:00