Commit Graph

132 Commits

Author SHA1 Message Date
Pravar D Mahajan ecc96be8c5 [MRG] Raise exception on providing complex data to estimators (#9551)
* Modifies model_selection.cross_validate docstring (#9534)

- Fixes rendering of docstring examples
- Instead of importing cross_val_score in example, cross_validate is imported

* raise error on complex data input to estimators

* Raise exception on providing complex data to estimators

* adding checks to check_estimator for complex data

* removing some unnecessary parts

* autopep8 changes

* removing ipdb, restoring some autopep8 fixes

* removing ipdb, restoring some autopep8 fixes

* adding documentation for complex data handling

* adding one line explanation for each test case
2017-09-01 11:26:19 +02:00
Loïc Estève 75b0448672 DOC improve check_memory related docstrings (#9649) 2017-08-31 09:05:48 +10:00
Kumar Ashutosh e66aa6dc70 ENH Ducktyping to allow for alternative Memory implementations (#9584) 2017-08-30 15:21:24 +10:00
Taehoon Lee 27bbdb570b Fix typos (#9320) 2017-07-12 18:05:21 +10:00
(Venkat) Raghav, Rajagopalan b6f8865b0a [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (#9206)
* add automatic test of docstrings for function / method signatures using numpydoc
2017-07-11 18:42:10 +02:00
Andreas Mueller 5271a193c3 MRG Sphinx fixes (#9155) 2017-06-28 17:00:13 +02:00
Joan Massich 06d0e0da01 [MRG + 2] improve check_array error message (#9126) 2017-06-26 11:10:39 +02:00
Joan Massich 90cfb4815a [MRG+2] Make `check_array` Error message independent of variable name (#9068) 2017-06-14 23:54:47 +10:00
Joan Massich 7cfec782c7 [MRG+2] Ridge linear model dtype consistency (all solvers but sag) (#9033) 2017-06-14 23:26:55 +10:00
Joel Nothman e31c4f1e9e DOC List more utils in API ref (#8827) 2017-06-08 15:31:26 +02:00
Joel Nothman ee88cf44ea [MRG+1] Option to suppress validation for finiteness (#7548)
* ENH add suppress validation option

* TST skip problematic doctest

* Rename SUPPRESS_VALIDATION to PRESUME_FINITE

* Change PRESUME_ to ASSUME_ for convention's sake

* DOC add note regarding assert_all_finite

* ENH add set_config context manager for ASSUME_FINITE

* Make ASSUME_FINITE private and provide get_config

* Fix ImportError due to incomplete change in last commit

* TST/DOC tests and more cautious documentation for set_config

* DOC what's new entry for validation suppression

* context manager is now config_context; set_config affects global config

* Rename missed set_config to config_context

* Fix mis-named test

* Mention set_config in narrative docs

* More explicit about limmited restoration of context

* Handle case where error raised in config_context

* Reset all settings after exiting context manager
2017-06-08 13:42:17 +02:00
Guillaume Lemaitre 92cb166647 [MRG] DOC Homogeneous deprecation in docstring (#8907)
Update developers doc to use "deprecated" sphinx directive.
2017-05-23 08:42:08 +02:00
guiniol 45d9182e6d [MRG+1] Fix float size in as_float_array (#8598)
* Fix float size in as_float_array

* Add tests for small ints in as_float_array

* Add test for object dtype

with minor tweaks
2017-03-21 16:13:48 +01:00
Kat Hempstalk daeba62b9c [MRG+2] Fixed assumption fit attribute means object is estimator. (#8418) 2017-02-21 14:20:05 +01:00
Josh Karnofsky e5ceda88f2 FIX check_array's accept_sparse param now takes true/false/str/list, but not None (#7937) 2016-12-20 21:45:43 +11:00
Andreas Mueller 5c4b1bb231 [MRG+1] Housekeeping Deprecations for v0.19 (#7927)
* remove stuff to be removed 0.19

* more changes

* remove classes from 0.19 whatsnew

* remove _LearntSelectorMixin

* remove ProjectedGradientNMF, load_lwf_*

* minor fixes

* remove more copy from logistic regression path

* remove lda, qda from __init__.__all__

* remove pg solver in nmf from tests etc

* remove class_weight="auto" from tests

* doctest change for decision_function_shape="ovr"

* remove transfrom from tree test, minor fixes to tree tests

* some fixes in the tests

* undo changes in functions which still allow 1d input...

* also allow 1d in scale

* more test fixes...

* last test fixes in forest and tree

* svm default value change doctest failures

* pep8

* remove more class_weight="auto" stuff

* minor cosmetics in docstrings deprecated / removed behavior.

* say that store_covariance has been moved to __init__ in discriminant_analysis
2016-12-09 12:43:38 -05:00
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