Commit Graph

116 Commits

Author SHA1 Message Date
Olivier Grisel e94c35d902 ENH make validation message easier to understand (#7294) 2016-08-31 21:35:57 +10:00
Nelson Liu ec8299abfc
DOC: fix typo in check_arrays 2016-05-07 18:26:33 -07:00
xyguo 8182f4bd04 Fixing default order docs of sklearn.utils.check_array 2016-04-29 18:08:11 -04:00
Raghav R V a228016585 Leading underscores for warnings imported from sklearn.exceptions
in other modules where warnings are deprecated.

Prefix warnings imported from sklearn.exceptions instead of
suffixing to prevent showing both the suffixed warning
and the deprecated warning during tab completion.
2016-01-08 12:40:10 -05:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Andreas Mueller 4bd1286328 COSMIT missing whitespace in error message 2015-11-02 16:24:02 -05:00
hlin117 c45075123a Added documentation about y nan handling in check_X_y 2015-10-21 11:11:08 -04:00
Raghav R V 857cb09254 FIX/ENH Make the moved class resilient to the deprecation patching 2015-10-20 01:24:35 +02:00
Raghav R V 61ae8d56c4 MAINT move deprecated into deprecation.py 2015-10-19 22:35:36 +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
Vighnesh Birodkar f0121b7baa removed reshaping in fast_mcd and replaced by check_array
Added fast_mcd 1D test

fixed syntax error cause py34 was failing

raise value error in check_array when min_samples>=2

formatting

added checl_array to MCD class and a test for the class

pep8 formatting

fixed string formatting and modified tests
2015-10-09 18:41:59 -04:00
Olivier Grisel f1c5924b36 ENH better error message for estimators with ensure_min_* checks 2015-10-01 14:44:05 +02:00
Olivier Grisel 6966881328 MAINT use inspect.signature for introspection 2015-09-23 16:30:53 +02:00
hlin117 698b670da7 check_X_y: Added mention that function returns y array 2015-09-12 18:14:48 -05:00
Olivier Grisel 250507ffa6 FIX deprecation message for 1d data 2015-09-10 09:55:35 +02:00
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
Lars a6c6e732c5 Merge pull request #3659 from chyikwei/onlineldavb
ENH Latent Dirichlet Allocation (LDA) with online variational Bayes
2015-08-09 19:13:01 +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
Chyi-Kwei Yau 6b16e9de61 move check_non_negative to utils/validation.py 2015-05-15 23:01:12 -04:00
Immanuel Bayer 0949a2e353 remove order checks for sparse matrices 2015-04-16 14:13:26 +02:00
Gael Varoquaux 203298e088 Merge pull request #4541 from amueller/robust_input_dtype_check
[MRG + 1] FIX be robust to columns name dtype, robust dtype checking
2015-04-14 17:45:22 +02:00
Olivier Grisel 79d9aa2152 STYLE PEP8 2015-04-10 16:11:21 -04:00
Andreas Mueller 89c1dc5488 FIX be robust to columns name dtype and also to dataframes that hold dtype=object. 2015-04-07 15:54:42 -04:00
Joel Nothman 69827c4b58 TST Test check_consistent_length and TypeError with ensemble arg 2015-02-26 16:30:39 +01:00
Olivier Grisel feceab6f62 FIX test for consistent handling on empty input data 2015-02-26 10:45:06 +01:00
Olivier Grisel 3468e00471 Merge pull request #4057 from amueller/dtype_object_conversion
[MRG + 2] make check_array convert object to float.
2015-02-24 22:33:20 +01:00
Andreas Mueller 96d4b3e709 more robust check for dtype object 2015-02-18 14:11:58 -08:00
Olivier Grisel 4f3613f20e Merge pull request #4251 from ogrisel/fix-shape-format
[MRG] FIX broken test under 64 bit Python 2 / Windows
2015-02-16 14:10:09 +01:00
Olivier Grisel 0373cc00e9 FIX broken test under 64 bit Python 2 / Windows 2015-02-16 13:56:22 +01:00
Lars Buitinck 414cda9b94 FIX TypeError not ValueError in is_fitted 2015-02-16 13:05:15 +01: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
Olivier Grisel d16e9eeb1b FIX stricter validation for non-empty input data 2015-02-14 00:39:26 +01:00
Olivier Grisel a168a6cea2 STYLE cosmetics / unused import 2015-02-06 11:56:31 +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
Andreas Mueller c970fb51e7 COSMIT spelling 2015-01-15 15:09:35 -05:00
Raghav R V 0bca2ffdfa FIX Refactor _is_fitted method into check_is_fitted.
DOC Make the docstring of NotFittedError class to conform to pep8.

DOC Make the error message of check_is_fitted more newbie friendly.
2015-01-12 00:33:40 +05:30
Raghav R V 35938f2a03 FIX support_ parameter should be tested, not the coef_ 2015-01-12 00:33:40 +05:30
Raghav R V 0fce60d285 TST Add tests to assert if NotFittedError is raised appropriately 2015-01-12 00:33:40 +05:30
Raghav R V b3209c10fc MAINT Add new function to check if an estimator is fitted
TST Add tests for the _is_fitted and check_is_fitted fns
2015-01-12 00:32:20 +05:30
Jake VanderPlas 53f3b72660 make utils.check_symmetric future-proof 2014-12-31 09:00:18 -08:00
Jake VanderPlas 4ef7213a15 add more informative doc & error message in utils.check_symmetric 2014-12-29 10:31:00 -08:00
Jake VanderPlas 6444582e48 DOC: fix docstring of check_symmetric 2014-12-29 09:28:10 -08:00
Jake VanderPlas a21957e85c rename ensure_symmetric -> test_symmetric 2014-12-29 08:36:25 -08:00
Jake VanderPlas 7794d90471 MAINT: create ensure_symmetric utility function to check matrix symmetry 2014-12-28 21:02:35 -08: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
akshayah3 367845cacd Shifted the _check_sample_weight into BaseWeightBoosting class 2014-09-28 20:03:58 +05:30
akshayah3 16bc265ed8 dded tests to test_boosting 2014-09-28 14:58:55 +05:30
akshayah3 11d3696de2 Added make_fit_parameter method 2014-09-27 19:35:13 +05:30
Lars Buitinck 88d473cd23 MAINT move comment to the appropriate place 2014-09-22 11:01:00 +02:00
Lars Buitinck ed0e6d7ae3 DOC multi_output parameter on validation function 2014-08-30 14:22:07 +02:00