Commit Graph

71 Commits

Author SHA1 Message Date
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
giorgiop 140a5acda8 MAINT depr of center_data, normalize in linear_model 2016-02-17 14:26:50 -05:00
Andreas Mueller fb123ed24b More doc fixes. Latex builds again. 2015-11-20 16:30:45 -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
Olivier Grisel f1c5924b36 ENH better error message for estimators with ensure_min_* checks 2015-10-01 14:44:05 +02:00
Raghav R V 882c346abd DOC Make cv documentation consistent across our codebase 2015-09-10 09:15:13 +05:30
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 62325cbb58 MAINT merge _check_cv into check_cv as indices argument is removed in 0.17 2015-06-08 16:37:03 +05:30
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Olivier Grisel f4366d5d36 FIX Gram OMP check_finite on old scipy 2015-05-20 11:38:38 +02:00
Andreas Mueller 211f204767 fix ompcv on old scipy versions 2015-03-18 10:25:01 -04:00
Andreas Mueller cd5166e82f make check_array convert object to float.
fix dtype check, add test. unfriend all multi-output estimators on facebook.

try to fix what is happening to y (by doing nothing to y)

make test work...

Make everything accept object y or say "invalid label"

fix multioutput linear models

add test for sensible error message.
2015-02-15 12:13:41 -05:00
Andreas Mueller e3e0827243 FIX check (and enforce) that estimators can accept different dtypes. 2015-02-10 15:37:15 -05:00
Andreas Mueller c970fb51e7 COSMIT spelling 2015-01-15 15:09:35 -05:00
trevorstephens 7c50e6c8eb various docstring fixes for web docs 2014-11-30 17:59:42 -08:00
Raghav R V 4a8c7a789c Fixes #3644 2014-11-25 23:24:54 +05:30
Joel Nothman b3bdb08964 DOC fix formatting of attributes etc. in docstrings 2014-07-28 19:04:59 +10:00
MechCoder d72ca5974f Added n_iter attribute to OMP (and CV) 2014-07-22 15:09:39 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
lesteve 7236ade3f0 Tidy up by removing unnecessary local variables 2014-07-17 16:32:19 +01:00
lesteve 259936599a Remove 'copy_X', 'copy_Gram' and 'copy_Xy' documentation since these parameters have been removed 2014-07-17 15:23:18 +01:00
lesteve 7d905b8c5a Remove deprecated 'Gram' and 'Xy' parameters from OrthogonalMatchingPursuit.fit 2014-07-17 10:23:28 +01:00
lesteve 0a953a1187 Remove deprecated 'copy_Gram', 'copy_Xy' and 'copy_X' parameters 2014-07-17 09:59:42 +01:00
lesteve 7b69ace3e1 Remove deprecated 'precompute_gram' parameter 2014-07-17 09:47:07 +01:00
Andreas Mueller d12d3132c4 Fix some fun column span alignment errors. 2014-06-07 16:48:48 +02:00
Gael Varoquaux 1b67fe33e5 MAINT: scipy 0.10 and 0.11
linalg.solve_triangular does not have a check_finite keyword argument
2014-03-03 23:51:38 +01:00
Gael Varoquaux dc27992c1a MAINT: remove our solve_triangular
No longer needed, since we depend on scipy >= 0.9
2014-03-03 20:25:33 +01:00
GaelVaroquaux dc8a03e958 BUG: fix convergence check in OMP 2013-11-29 17:52:19 +01:00
Lars Buitinck 9a9b9e85ed DOC+COSMIT: typos, lots of them
Fixes #2102. There's one typo left in joblib which is better fixed
upstream.
2013-09-13 16:29:42 +02:00
Joel Nothman d0c981fa1d MAINT deprecate indices=False for cross validation generators 2013-09-10 10:58:24 +02:00
Olivier Grisel daa051edab Py3 fix 2013-07-26 14:11:39 +02:00
Vlad Niculae 86d7afbd50 FIX OrthogonalMatchingPursuit normalized twice 2013-07-26 12:08:10 +02:00
Vlad Niculae c4df8ed0df FIX respect conventions in OMP init 2013-07-26 09:50:54 +02:00
Alexandre Gramfort 1e408aaaad API : deprecations in orthogonal_mp 2013-07-26 09:50:54 +02:00
Alexandre Gramfort 4ce4863fc7 API : deprecate a lot of extra parameters in OMP object 2013-07-26 09:50:53 +02:00
Alexandre Gramfort e4172212aa use pre_fit in OMP 2013-07-26 09:50:53 +02:00
Alexandre Gramfort bad053852a DOC : more docstring fixes 2013-07-26 09:50:53 +02:00
Vlad Niculae 372ca22492 ENH OrthogonalMatchingPursuitCV estimator
FIX: work with max_iter=1, though it does not make sense

DOC add OrthogonalMatchingPursuitCV docstrings
2013-07-26 09:50:53 +02:00
Vlad Niculae 6f030d90ec ENH add return_path in orthogonal matching pursuit
DOC Clarify docstrings
2013-07-26 09:50:53 +02:00
Joel Nothman f1e9116c30 DOC fix docstring headings 2013-06-13 18:50:30 +10:00
Robert Layton dacfd8bd5d DOC: Replaced all BSD style licenses with "BSD 3 clause"
Replaced all BSD style licenses with "BSD 3 clause"
Not checked yet!

Removed duplicate "3 clause, 3 clause"

Removed trailing period if exists

Fixed some missed licences, still about 50 to do, but those can be automated

Think I got the last of them.

Apparently me and sed have different ideas of regex.

Found a few more
2013-04-30 08:34:46 +02:00
Andreas Mueller a3b55f4eae ENH fix test_estimators_overwrite_params to also test regressors and transformers. Then fix all the regressors and transformers ... meh! 2013-02-11 17:13:25 +01:00
Olivier Grisel 1967a0b323 P3K use six to have a python 2 & 3 compatible code base 2013-02-09 18:08:44 +01:00
Andreas Mueller 754c2d9533 COSMIT pep8 2012-12-22 16:48:17 +01:00
Andreas Mueller 2f0dd13e4d DOC added comment about default for n_nonzero_coefs. 2012-11-10 15:53:58 +00:00
Andreas Mueller a351355510 ENH add checks for clustering, regressors, transformers 2012-11-10 15:53:57 +00:00
Andreas Mueller 57001002bb COSMIT pep8 2012-10-10 09:38:10 +02:00
Alexandre Gramfort 01d032c482 style + typo 2012-09-02 23:16:53 +02:00
Alexandre Gramfort 9cbdad8afb ENH : simplify handle of copy of Gram and X with array2d in OMP 2012-09-02 23:16:53 +02:00
Vlad Niculae 4575b322c1 Remove sparse_encode_parallel
This was deprecated in 0.10 as far as I can tell.
2012-09-01 20:02:13 +02:00