Commit Graph

78 Commits

Author SHA1 Message Date
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Joris Van den Bossche 4f5dd77d19 BUG: fix check_array on pandas Series with custom dtype (eg categorical) (#12706)
Closes #12699. Related to #12625
2018-12-03 21:25:52 +11:00
Bartosz Michałowski fa98a72dcc MNT Replaced all occurrences of assert_true and assert_false with assert (#12588) 2018-11-28 09:16:26 +08:00
Andreas Mueller 104f684791 FIX check_array dtype check for pandas series (#12625) 2018-11-21 09:23:01 +11:00
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +11:00
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Zach Miller 5d8dfc9677 FIX SkLearn `.score()` method generating error with Dask DataFrames (#12462) 2018-11-06 21:46:13 +11:00
Jacopo Notarstefano a1be3254c0 MNT Make check_X_y raise a better error when y is None (#12283) 2018-10-05 18:35:04 +08:00
Tom Dupré la Tour a11154e727 [MRG] improve check_non_negative for sparse matrices (#12106) 2018-09-27 14:13:50 +02:00
William de Vazelhes a0418215fe TST FIX use match rather than message in pytest.raises (#12001)
Previously these assertions would pass without matching.
2018-09-05 07:36:15 +10:00
Gael Varoquaux 47d3b3c30f [MRG] TST: avoid DeprecationWarning on latest joblib (#11625) 2018-07-20 16:13:50 +02:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Joel Nothman 14e7c328df Restructure access to vendored/site Joblib (#11471)
In order to fix #11408, this swaps `joblib` and `_joblib`. It however, allows users to access joblib's `Memory` or `Parallel` functionality without accessing `sklearn.externals._joblib` by importing `Memory`, `Parallel`, etc. into `sklearn.utils`.
2018-07-17 18:02:11 +02:00
Joan Massich 2d7567f9f7 Rework warning in check_array when silent convert string to float (#11577) 2018-07-17 09:17:21 -05:00
William de Vazelhes 42e6d4e199 ENH warn_on_dtype for DataFrames (#10949) 2018-06-28 22:00:21 +10:00
Joel Nothman a7e17117bb [MRG] Large sparse matrix support (#11327) 2018-06-25 15:15:11 +00:00
Mark Roth c50dc0ec9a MAINT Fix #9350: Enable has_fit_parameter() and fit_score_takes_y() to work with @deprecated in Python 2 (#11277) 2018-06-20 12:58:23 +10:00
Loïc Estève 9ea723f07a [MRG+1] Read-only memmap input data in common tests (#10663) 2018-04-23 14:58:40 +02:00
Gaurav Dhingra eed83790b0 ENH Change default gamma from 'auto' to 'scale' in SVC (#10331) 2018-03-10 10:39:21 +08:00
Ryan 7108d17be4 [MRG+1] Fix #10229: check_array should fail if array has strings (#10495)
* Add deprecation warning to check_array for flexible array w/ dtype=numeric
2018-02-23 00:08:52 +11:00
ksemb 77418a0275 MAINT Fix escape sequences that are deprecated in Python 3.6 (#10578)
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2018-02-07 10:41:21 +11:00
Guillaume Lemaitre 4c99cd4aa2 [MRG+1] MAINT dissociate nan and inf in check_array (#10459) 2018-01-18 13:56:41 +01:00
Liam Geron 202b5321f1 MAINT Remove redundancy in #9552 (#9573) 2017-10-27 06:57:20 +11:00
Loïc Estève deaa96452a Fix test_validation.py 2017-09-01 14:19:19 +02:00
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
Kumar Ashutosh e66aa6dc70 ENH Ducktyping to allow for alternative Memory implementations (#9584) 2017-08-30 15:21:24 +10:00
Joan Massich 06d0e0da01 [MRG + 2] improve check_array error message (#9126) 2017-06-26 11:10:39 +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
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
Olivier Grisel 096a9cbead [MRG] MAINT Python 3.6 fixes (#8123)
* FIX dict order dependent doctest

* FIX str concat TypeError message changed in Python 3.6

* MAINT upgrade travis config with most recent conda deps
2016-12-27 19:50:25 +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
Konstantin Podshumok 9b2aac9e5c [MRG + 1] [TST] (half-cosmetic) use less nose.tools import to simplify future transition to py.test (#7384)
* use less nose.tools import to simplify future transition to activly developing test suites/runners

* assert_equal -> assert_array_equal in test_feature_hasher_pairs_with_string_values

and one missed ImportError that should be replaced with AttributeError

* test for py2.6 compat with except AttributeError

* fix importing of SkipTest

* force using nose in python2.6 for now

* there was no assert_dict_equal in py2.6. but we can use assert_equal

although failed test will look a little bit ugly

* remove nose imports from doc/datasets
2016-10-07 12:46:52 -04:00
Loïc Estève 50ab94db46 MockDataFrame.__array__ should take an optional dtype 2016-08-26 10:18:35 +02:00
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