Commit Graph

250 Commits

Author SHA1 Message Date
Arnaud Rachez 5db2adf93c MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +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
Jan Hendrik Metzen 51f01d6bc8 FIX cross_validation and pairwise_kernels treat GP kernels as special case 2015-10-19 18:07:11 +02:00
Gilles Louppe a4e4cf9875 FIX: remove shuffling in LabelKFold 2015-10-19 16:27:04 +02:00
Gilles Louppe 1f4bc26a02 FIX: Ensure correct LabelKFold folds when shuffle=True 2015-09-25 13:26:34 +02:00
Raghav R V 882c346abd DOC Make cv documentation consistent across our codebase 2015-09-10 09:15:13 +05:30
Gilles Louppe 410e7f2c2a ENH: remove unnecessary assignments 2015-09-08 07:52:12 +02:00
Gilles Louppe c769a65e15 COSMIT: variable names, documentation, etc 2015-09-07 10:08:17 +02:00
Gilles Louppe cf7bc7b035 ENH: rename to LabelKFold
COSMIT: doc, pep8, etc

Refactor code
2015-09-07 09:56:19 +02:00
Jean Kossaifi 6eb4028519 Added subject independent KFold
Changed SubjectIndependentKFold to DisjointGroupKFold

cosmetic changes  test (fix seed correctly, use assert_equal for
meaningful error messages)

Changed name to DisjointLabelKFold

Added example of use

FIX: whitespace related doctest failure

FIX: Python 2.6 requires the field numbers in print

FIX: change docstring to comment in test function

DOC: moved docstring from function to class

FIX: added call to parent class

FIX: error in calling the parent

DOC: fixed doctest

FIX: doctest

Cosmetic changes (minor refactoring)

Optimised code (use np.bincount)

Cosmetic: use samples instead of weight for clarity

Minor fix: removed shuffle parameter

Cosmetic

Use mergesort instead of quicksort for reproducibility.

Changed variable name 'y' to 'label'.

Added test for degenerate case where n_folds > n_labels.

Documented the requirement n_labels > n_folds.

DOC: improved description + added see also sections.

Fixed dtype of temporary arrays.

Improved test: check that one label is not in both test and training.

Added documentation for DisjoinLabelKFold.
2015-09-07 09:53:58 +02:00
Gael Varoquaux e2e5fbd8e1 Merge pull request #5201 from christophebourguignat/master
DOC Clarify random_state parameter in KFold() doc
2015-09-02 07:16:11 +02:00
Christophe Bourguignat b10e78edbf [DOC] Precision on random_state in KFold() doc
Without paying attention, we could think KFold(30, random_state=123)
and KFold(30, random_state=124) generated two different versions
2015-09-01 20:12:07 +02:00
Gael Varoquaux 364825ae67 Merge pull request #5194 from christophebourguignat/master
[MRG+1] DOC Updated documentation for cv parameter
2015-09-01 09:51:58 +02:00
Christophe Bourguignat 53c3530ba3 DOC Updated documentation for cv parameter (issue #4533)
Added « optional »
2015-08-31 23:18:15 +02:00
Christophe Bourguignat 1991c43923 DOC Updated documentation for cv parameter (issue #4533) 2015-08-31 23:09:10 +02:00
Brian McFee 21a966ae8a ENH: added LabelShuffleSplit cv iterator 2015-08-30 12:00:18 +02:00
Olivier Grisel ea42c55b7b PEP8 in cross_validation module + tests 2015-08-27 15:34:41 +02:00
Buddha Prakash 26d3323242 Remove redundant p variable 2015-08-26 16:15:02 +05:30
Buddha Prakash e35c90ceeb Use Inverted locations to reorder the predictions 2015-08-26 14:27:44 +05:30
Buddha Prakash 48adf8be7d Use a single vstack for concatenating all blocks in prediction matrix 2015-08-26 08:07:15 +05:30
Buddha Prakash aa2d6bfb5f Add check for sparse prediction in cross_val_predict 2015-08-26 07:37:12 +05:30
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
Andreas Mueller c5b395fb3e FIX / TST make cross_val_predict work on lists, test pass-through and compatibility with various input types. 2015-05-19 15:04:45 -04:00
Andreas Mueller 8fff05c3e8 Merge pull request #4438 from mbatchkarov/stratified_train_test_split
[MRG + 2] Stratified `train_test_split`
2015-05-09 17:31:14 -04:00
Miroslav Batchkarov 52244dc6df incorporated amueller's feedback 2015-04-24 10:08:19 +01:00
Immanuel Bayer 00409d746b DOC use standart X, y notation 2015-04-15 11:37:27 +02:00
Miroslav Batchkarov 6cd1cae830 using StratifiedShuffleSplit instead of StratifiedKFold
this resolves API incompatibility in 803dcc10a2
2015-03-24 09:07:03 +00:00
Miroslav Batchkarov 803dcc10a2 fixed issue when train_size < test_size for stratified 2015-03-23 19:44:51 +00:00
Miroslav Batchkarov 34c85ed995 [WIP] preliminary implementation of stratified train_test_split
Broken when train_size < test_size
2015-03-23 19:19:40 +00:00
Raghav R V bf5fd93f47 MAINT Remove the deprecated n_iterations from StratifiedShuffleSplit 2015-03-19 05:13:09 +05:30
Raghav R V 88759ba187 MAINT remove the deprecated n_iterations param 2015-03-19 04:14:24 +05:30
Andreas Mueller e1af92b640 remove cross_validation.Bootstrap 2015-03-18 14:51:37 -04:00
Andreas Mueller 6beacc3fb6 remove deprecated stuff from 0.17 2015-03-18 14:49:04 -04:00
Loïc Estève 67dcd99d82 TST fix tests with numpy 1.6.1
np.bincount raises an Exception with empty input arrays for numpy versions < 1.6.2
Add utils.fixes.bincount to tackle this issue and use it instead of np.bincount
2015-02-01 15:49:49 +01:00
Lars 17726d2481 Merge pull request #4141 from amueller/bootstrap_int_one_fix
[FIX] Bootstrap with test_size=1 fix
2015-01-24 15:24:18 +01:00
Thomas Unterthiner 5c5fbf5ab0 COSMIT pep8 cleanups 2015-01-21 21:54:11 +01:00
Andreas Mueller edb73cc693 FIX check for integer 1 before checking for floating 1 (isinstance(1, numbers.real) == True) 2015-01-21 15:53:03 -05:00
Thomas Unterthiner a6723edca5 ENH: cross-validate over predefined splits 2015-01-21 13:04:50 +01: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
akshayah3 91c03a433a Added helper function 2015-01-06 19:21:08 +05:30
akshayah3 5b9653334f Sparse inputs for fit_params 2015-01-05 16:14:36 +05:30
Andreas Mueller 46c1c42131 remove deprecated ``n_bootstraps`` parameter in Bootstrap cv object, verbose in FactorAnalysis and SelectorMixin. Also adjust some deprecation strings. 2014-12-29 13:53:42 -05:00
Andreas Mueller 7a38062c24 FIX backward compatibility.
force_arrays was never in a release, allow_nd was a legal option to ``train_test_split`` that raises an error in master.
2014-12-19 12:15:03 -05:00
Aldrian Obaja 1e8bdb859e FIX bug in fit_params assumed to be an array
Fixes gh-3957.
2014-12-15 18:07:05 +01:00
Gael Varoquaux 1d6566bd59 Merge pull request #3690 from queqichao/fix_bug_in_cross_validation_when_using_sparse_matrix_for_fit_params
+ Fix the bug of calling len when using sparse matrix for fit_params in ...
2014-11-24 23:37:33 +01:00
Luis Pedro Coelho 2f275de41d ENH Add cross_val_predict function
This function returns the cross-validated prediction for each element in
the input data (i.e., the prediction that is made when that object is in
the test set).
2014-11-03 11:51:10 +11:00
Michal Romaniuk 58be184f5f Enable grid search with classifiers that may throw an error on individual fits. 2014-10-02 10:03:17 +10:00
queqichao f1f9760ff6 + Fix the bug of calling len when using sparse matrix for fit_params in cross_validation.py.
+ Add test case for the above fix.
2014-09-22 23:09:25 -04:00
Nikolay Mayorov e8942057cc FIX Implemented correct handling of multilabel y in cross_val_score 2014-07-29 11:49:58 +02:00