Commit Graph

60 Commits

Author SHA1 Message Date
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
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
Raghav R V e3afc0e8c9 MAINT move custom error/warning classes into sklearn.exceptions
ENH NonBLASDotWarning -> EfficiencyWarning; Improve error message
DOC Add exceptions module to modules/classes.rst
MAINT Move ConvergenceWarning, UndefinedMetricWarning et al into exceptions
MAINT Remove ChangedBehaviorWarning from base
DOC/FIX Improve DataConversionWarning's docstring
2015-10-19 22:35:35 +02:00
Olivier Grisel 2300bdd865 MAINT switching master to 0.18.dev0 2015-10-16 17:17:57 +02:00
Vinayak Mehta 679936f6bc MAINT Deprecate LDA/QDA in favor of expanded names
The LDA accronym for Linear Discriminant Analysis is ambiguous
because of the newly introduced Latent Dirichlet Allocation model.

We therefore deprecate the sklearn.lda.LDA and sklearn.lda.QDA
in favor of explicit names.
2015-09-11 15:32:11 +02:00
Andreas Mueller 6beacc3fb6 remove deprecated stuff from 0.17 2015-03-18 14:49:04 -04:00
Andreas Mueller 5e4809caa8 Move dev branch to 0.17 2015-03-06 17:55:01 -05:00
Olivier Grisel ff942f9688 MAINT use canonical PEP-440 dev version consistently 2015-03-06 18:10:18 +01:00
Jan Hendrik Metzen ecfc93ddf6 ENH Add probability calibration based on isotonic regr. and Platt's sigmoid fit + calibration-curve
CalibratedClassifierCV allows to calibrate the predicted probabilities of base classifiers based on a cross-validation scheme and either Platt's sigmoid fit or isotonic regression. This can be used to compensate for an under-confident or over-confident classifier. It allows also to turn the decision scores of a non-probabilistic classifier into valid probabilities.

The function calibration_curve allows to evaluate how well calibrated the probabilties returned by a classifier are. Ideally, the curve should be close to diagonal.
2015-02-20 19:37:10 +01:00
Jan Hendrik Metzen f1b42845f4 FIX Add kernel_ridge to list of all submodules 2015-01-18 11:01:43 +09:00
Olivier Grisel 6d7d25fc8c MAINT dev version to follow PEP440 2014-12-25 23:11:15 +11:00
Joel Nothman b4e41cb614 FIX update sklearn.__all__ to include all end-user submodules 2014-09-02 11:23:19 +02:00
Lars Buitinck be93a75d29 MAINT remove sklearn.test 2014-07-22 15:58:55 +02:00
Lars Buitinck 259b487fb4 MAINT remove deprecated sklearn.pls module 2014-07-22 15:54:54 +02:00
Olivier Grisel e8cb36f83d MAINT master to 0.16-git
master has 0.16-only commits since the 0.15-branching tag.

New features have to be documented as new features in the 0.16 section.
Bugfixes to be included in the 0.15.0 release have to be cherry-pick'ed in the
0.15.X branch and document in the 0.15 section.
2014-07-14 21:42:06 +02:00
Olivier Grisel 42c31430c9 MAINT: restore -git version in the master branch after the last release merge 2014-06-09 14:53:40 +02:00
Olivier Grisel bc8666f60f Branching 0.15.X to prepare the 0.15.0b1 release 2014-06-06 11:57:04 +02:00
Joel Nothman 61c3b6a32f FIX use of str.format for Py2.6 2013-11-28 14:53:33 +11:00
Joel Nothman 9e1edd11e3 FIX stop forcing deprecation warnings for external packages 2013-11-28 14:32:07 +11:00
Gael Varoquaux af5e297302 MAINT/DOC: bump docs and rev numbers to 0.15-git 2013-08-08 01:13:06 +02:00
Gael Varoquaux 6bb4cd7d92 TST: avoid nose running sklearn.test as a test 2013-08-07 22:50:33 +02:00
Gael Varoquaux 987e2a002a MISC: deprecation notice
Indicate when the function will be removed.
2013-08-06 08:38:30 +02:00
Gael Varoquaux bec85af385 MAINT: remove sklearn.test() 2013-08-06 08:38:30 +02:00
Nelle Varoquaux b732f4d1a7 MAINT deprecated the pls module, moved CCA to cca_
TEST don't need to excluse _PLS and _CCA
2013-07-25 11:01:59 +02:00
Nelle Varoquaux 38e84c5fb9 MAINT Move the pls to the cca to a cross_decomposition module 2013-07-25 11:01:59 +02:00
Andreas Mueller 19beac87ff REL change version to 0.14-git everywhere, update news, support page. 2013-01-21 22:07:26 +01:00
Andreas Mueller e12c67306e cosmit pep8 2012-12-16 23:28:10 +01:00
Alexandre Gramfort 23ac37a4fb API : move isotonic regression out of linear_model 2012-11-14 22:01:53 +01:00
Lars Buitinck 88f7df2922 COSMIT website address + copyedit in __init__.py 2012-10-23 17:40:33 +02:00
Fabian Pedregosa fb7e3abe50 Python3 compat: print() 2012-10-05 17:56:37 +02:00
Andreas Mueller d50c0cb06c COSMIT pep8 2012-10-02 17:31:00 +01:00
Andreas Mueller f1e4427c5c MISC starting 0.13 cycle 2012-09-04 19:39:19 +01:00
Gael Varoquaux b5519f08da Merge branch 'linking_arrayfuncs'
Conflicts:
	setup.py
	sklearn/__init__.py
2012-07-26 23:33:29 +02:00
GaelVaroquaux ecda4de954 COSMIT: explainations of the partial import 2012-07-26 11:39:56 +02:00
David Cournapeau d8e30f1ca8 REF: hack to be able to share distutils utilities.
We took the ugly trick from NumPy to separate build vs normal use of
sklearn imports.
2012-07-25 11:35:40 +01:00
Yaroslav Halchenko 4915d4dcd9 ENH: sklearn.setup_module to preseed RNGs to reproduce failures
Could easily be controlled from the environment via SKLEARN_SEED

Besides adding setup_module() to the sklearn space should be of no
effect for any regular imports of sklearn.
2012-07-23 16:42:18 +02:00
Gael Varoquaux cd7404706c MISC: clean up top-level namespace 2012-05-09 00:32:27 +02:00
Andreas Mueller 67cad73a56 RELEASE HEAD is now 0.12-git 2012-05-07 18:28:34 +02:00
Andreas Mueller 73fdf6a9c9 RELEASE 0.11 2012-05-07 18:19:35 +02:00
Gael Varoquaux df3dac765d BUG: fix testing on older numpy 2012-05-06 19:37:19 +02:00
Gael Varoquaux 1eae414837 TST: do not raise warnings in sklearn.test()
This fixes #834
2012-05-06 19:28:19 +02:00
GaelVaroquaux b36beb4e7b Merge branch 'label-propagation' 2012-02-02 12:55:56 +01:00
Clay Woolam 268aed6b42 TL directory change to push label propagation code into semi_supervised 2012-01-22 21:13:56 -08:00
Fabian Pedregosa 4533aa33da Start of 0.11 development cycle. 2012-01-10 18:27:24 +01:00
Fabian Pedregosa a07218757b Still some tweaks for the sklearn.test() example 2012-01-09 15:15:05 +01:00
Fabian Pedregosa 2108f11271 FIX: doctest 2012-01-09 14:58:16 +01:00
Fabian Pedregosa 552bc9d568 DOC: exaple for sklearn.test() 2012-01-09 14:27:30 +01:00
Gael varoquaux 81bff12a09 ENH: Easier debugging in check_build 2011-11-08 22:26:52 +01:00
vene 8782723e3a MISC: even better check_build error reporting 2011-10-08 19:03:37 +03:00
Gael varoquaux ea59b84075 MISC: better check_build error reporting 2011-10-08 11:35:51 +02:00