Commit Graph

41 Commits

Author SHA1 Message Date
Raghav R V 857cb09254 FIX/ENH Make the moved class resilient to the deprecation patching 2015-10-20 01:24: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
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
Immanuel Bayer 0949a2e353 remove order checks for sparse matrices 2015-04-16 14:13:26 +02: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
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Andreas Mueller f1b8283c95 catch some warnings, be less verbose in testing. 2015-03-02 14:40:35 -05: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
Lars Buitinck d90a8ae451 TST test last commit 2015-02-16 13:06:12 +01:00
Olivier Grisel d16e9eeb1b FIX stricter validation for non-empty input data 2015-02-14 00:39:26 +01: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 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 358e16390c TST: add test of check_symmetric 2014-12-29 08:36:42 -08:00
akshayah3 4d94392b49 Added _check_sample_weight 2014-09-28 19:23:36 +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
Andreas Mueller c235c3b566 ENH add allowed_sparse named argument for @ogrisel 2014-07-20 15:31:28 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
Andreas Mueller f7549fd2ba Refactor input validation. 2014-07-20 10:40:04 +02:00
Andreas Mueller b080d93b5e ENH don't convert dataframes in grid search and cross-validation 2014-07-18 10:02:14 +02:00
mjbommar 724b63a16c Replacing the test .todense() methods with .toarray() 2014-05-20 21:44:34 -04:00
Michael Eickenberg c7519ee87a TST safe_asarray for dok_matrix and lil_matrix 2014-04-06 13:41:54 +02:00
Lars Buitinck c0657ce683 ENH less copying in validation for neighbors 2014-04-06 13:38:45 +02:00
hamzeh eb04ccbc5e Implemented a check for ndim exceeding two in the utils.check_arrays function 2014-03-11 09:55:52 -04:00
Philippe Gervais e0011e4bd6 [BUG] safe_asarray() converts sparse matrices dtype
When called with a dtype kw argument, utils.safe_asarray() would
not change the dtype of a sparse matrix. This has been fixed.

Unit tests have been created for safe_asarray().
2013-08-27 10:28:27 +02:00
Andreas Mueller 5a1fde1194 COSMIT fixing some unused imports, adding stuff to __all__, and light pep8 (not all whitespace to make rebasing less painful) 2013-07-27 15:44:17 +02:00
Nicolas Trésegnie c91504a7fe Add test of the as_float_array behaviour when copy=True 2013-07-23 14:46:14 +02:00
Lars Buitinck 3840fecd7a ENH order *does* matter for sparse matrices 2013-07-11 11:50:23 +02:00
Andreas Mueller 03048ddb5f ENH more logical behavior, better docstring, tests 2013-01-05 19:59:46 +01:00
Gael Varoquaux 7842748cf7 BUG: copy and keep ordering
This is due to a change in behavior in numpy that now does
not keep the ordering by default when copying.

Fixes #1186
2012-09-28 09:32:03 +02:00
Olivier Grisel 0eca37dc17 cosmit 2012-09-12 22:34:00 +02:00
Alexandre Gramfort e4838831d9 ENH : add copy param to array2d_or_csx 2012-09-02 23:16:52 +02:00
Alexandre Gramfort 2184c4698d ENH : add copy arg to array2d and new atleast2d_or_csr usual for sparse coordinate descent
Conflicts:

	sklearn/utils/validation.py
2012-09-02 23:16:51 +02:00
Alexandre Gramfort b59e1005fc FIX : make as_float_array keep fortran order on dense array when copy 2012-08-21 17:08:47 +02:00
Lars Buitinck 38c3c30207 COSMIT refactor input validation code and tests 2012-07-20 15:18:16 +02:00
Alexandre Gramfort ad8e4912cb TST: use assert_true instead of assert + remove some relative imports 2012-02-11 15:43:03 +01:00
Olivier Grisel 106a6bf157 add tests for invalid argument + fixed a type error 2012-02-10 23:12:22 +01:00
Andreas Mueller 07b3690044 FIX: missing import 2011-12-20 23:53:21 +01:00
Lars Buitinck 2998a7cc04 COSMIT reorganise utils tests 2011-12-20 19:44:42 +01:00