Commit Graph

119 Commits

Author SHA1 Message Date
Joel Nothman 5b20d484ad [MRG] ENH enable setting pipeline components as parameters (#1769)
Pipeline and FeatureUnion steps may now be set with set_params, and transformers may be replaced with None to effectively remove them.

Also test and improve ducktyping of Pipeline methods
2016-08-29 23:32:42 +10:00
Joel Nothman 9539c0c00e [MRG + 1] ENH show no warning with chi2 of empty feature (#6978)
* ENH show no warning with chi2 of empty feature

* TST better error message when warnings raised

* TST fix test in old Numpy where another warning is issued
2016-07-31 09:35:19 +02:00
Sebastian Raschka 4d33cd62e4 rename function to func (#6700) 2016-07-01 21:50:40 +02:00
Thierry 6fb6c63b7b Modification of the ignore_warning function and _IgnoreWarning class. 2016-04-21 18:28:44 +02:00
Maniteja Nandana 29ee54a586 Meta estimator for multi output classification 2016-04-01 07:18:59 +05:30
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
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Andreas Mueller 776e53b127 skip unstable tests on 32bit platform 2015-11-02 15:21:22 -05:00
Loïc Estève efe93d4cc6 MAINT update joblib to 0.9.3 2015-10-30 17:43:00 +01: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
giorgiop 6a5a2f7960 partial_fit for scalers 2015-10-13 11:37:00 +02:00
Manoj Kumar 652b950074 Merge pull request #4242 from MechCoder/select_from_model
[MRG+1] Implemented SelectFromModel meta-transformer
2015-10-10 23:15:06 -04:00
Vighnesh Birodkar 735dd1fdca Fix warnings during tests 2015-10-08 14:52:21 -04:00
MechCoder 2ee718cc75 Add narrative docs and fix examples 2015-10-05 11:25:06 -04:00
maheshakya c438f78996 Implemented SelectFromModel meta-transformer 2015-10-05 11:19:57 -04:00
Olivier Grisel 1529a1e548 MAINT enable multiprocessing + kmeans test on Python 3.4 2015-09-04 11:47:34 +02:00
Arthur Mensch fead69a4ac Bugfix : type in cd changed for read only memmap compatibility 2015-07-31 12:12:40 +02:00
TomDLT fe38e2509d ENH check that unfitted estimators raise ValueError 2015-05-20 16:40:19 +02:00
TomDLT 89c1018c64 ENH improve check_array
ENH improve check_array to warn on dtype conversions

ENH make check_array accept several dtypes

ENH change validation with improved check_array

ENH change astype to avoid copy if possible

ENH remove warn_if_not_float
2015-05-19 16:13:42 +02:00
Alexandre Gramfort 9eb1964724 Merge pull request #4161 from rasbt/ensemble-classifier
[MRG + 2] EnsembleClassifier implementation
2015-05-08 09:21:36 +02:00
Andreas Mueller 9dc8118904 Merge pull request #4526 from vortex-ape/if_matplotlib
[MRG + 1] Changed import statement and checked for ImportError in if_matplotlib
2015-04-30 13:17:27 -05:00
Andreas Mueller 14c54c4047 FIX make backport of assert_raises_regex raise the same error as the python3 version. 2015-04-28 18:01:09 -04:00
rasbt 2910198f14 votingclassifier 2015-04-20 19:27:30 -04:00
jfraj c9510ed191 Fixing bug in assert_raise_message #4559
assert_raise_message now only calls assert_raises_regex
changing the message argument into a literal text
2015-04-14 13:00:46 -04:00
Vinayak Mehta 6efb03fdaa Changed import statement and checked for ImportError 2015-04-11 04:52:11 +05:30
Jan Hendrik Metzen 6ec7a0efbb TST Tests for the calibration module 2015-02-20 19:37:11 +01:00
Andreas Mueller e3e0827243 FIX check (and enforce) that estimators can accept different dtypes. 2015-02-10 15:37:15 -05:00
Raghav R V b3fbccca38 FIX various mismatch between docstring and signature params
DOC max_iterations -> max_iter. Make it consistent with kmeans

MAINT Replace the deprecated dx parameter with d in the docstrings

MAINT Deprecation warning for max_iterations parameter.
2015-01-16 11:54:57 -05:00
maheshakya 32491b0bbe FIX Modified assert_warns_message to ignore order of warnings. 2014-12-18 19:50:02 +01:00
maheshakya 7de8e3fc35 ENH Used GaussianRandomProjectionHash for handling hashing. 2014-12-18 19:50:02 +01:00
Andreas Mueller f35116ad03 Allow list of strings for type_filter in all_estimators. 2014-12-04 16:58:07 -05:00
Olivier Grisel a6993945da FIX make assert_raises_regex backport for 2.6 consistent with 2.7+
Use regex.search instead of regex.match.

Furthermore, silence the deprecation warning from Python 3.4 as
assert_raises_regexp is now deprecated in favor of the shorter name:
assert_raises_regex.
2014-11-18 11:59:01 +01:00
Lars Buitinck 79646ff633 MAINT use %r for better printing of regexps 2014-09-03 12:46:04 +02:00
Gael Varoquaux 49a7fe1d50 MAINT: be robust to numpy's DeprecationWarning
numpy 1.9 raises a lot of 'VisibleDeprecationWarning', which breaks our
test suite
2014-08-28 17:23:52 +02:00
Joel Nothman c25467ef1a MAINT Remove note that assert_warns comes with Numpy 1.7
This is obsolete since 9f45e37 when the behaviour of assert_warns was
altered.
2014-08-18 19:23:15 +10:00
Anders Aagaard 25f72c4647 FIX six issue with module imports
Fixes #3518, #3519.

Inspired by Johannes Schönberger's patch to scikit-image,
71743d2d6f
2014-08-01 10:49:29 +02:00
Joel Nothman d5430e3c0b DOC fix doc errors in utils.testing 2014-07-28 13:13:50 +10:00
Gael Varoquaux 4aac610dc3 TST: Fix warnings in np 1.9
These break our tests
2014-07-25 13:40:47 +02:00
Andreas Mueller 718f6ad19f split test_common.py into checks and test file.
move dataset generation into estimator_checks
2014-07-18 14:34:51 +02:00
Hamzeh Alsalhi 9f45e3730f Modified sparse OvR to handle sparse target data
Defaulted label binarizer to set sparse_output=True when training ovr
classifiers, edited Label binarizer to allow for sparse binary column output
2014-07-18 12:10:50 +02:00
Kyle Kastner 96895ebd39 Added utility to skip tests if running on Travis 2014-07-09 11:24:37 +02:00
Gael Varoquaux 5be7cc2063 Merge pull request #3333 from ogrisel/maint-skip-download-tests
[MRG+2] MAINT skip tests that require large data download under travis
2014-07-04 15:08:55 +02:00
Olivier Grisel ac45e5d03c MAINT skip tests that require large datadownload under travis 2014-07-02 13:50:47 +02:00
Noel Dawe 39f831d466 utils.testing: add assert_greater_equal and assert_less_equal 2014-07-02 11:47:32 +02:00
Andrew Clegg c217d10707 Fixed typo 2014-05-25 01:12:51 +01:00
Andrew Clegg c5fc383555 Workaround for andrewclegg/snake-charmer#12 2014-05-25 01:11:15 +01:00
Mikhail Korobov 20c45ae3d8 TST move Mac OS checking utility to sklearn.utils.testing 2014-03-21 04:21:00 +06:00
Lars Buitinck 23b3cc2eb5 MAINT drop support for SciPy < 0.9
TODO: get rid of solve_triangular. Just replacing it by scipy.linalg's
breaks OMP and least-angle regression.
2014-03-02 20:13:57 +01:00
Jaques Grobler 6ebcf4d020 COSMIT fix PEP8 errors 2014-02-02 00:30:28 +11:00
Gael Varoquaux 7c3a1c686a BUG: assert_raises_regexp for Py2.6 compatibility 2014-01-19 00:19:20 +01:00