* start work on separating instance-level tests
* minor refactoring / fixes to work without tags
* add clone into check_supervised_y_2d estimator check (which made other checks fail)
* remove duplicate check_estimator_unfitted assert
* add issue reference to whatsnew entry
* added some clones, minor fixes from vene's review
* rename estimator arg to estimator_org to make a visible distinction before and after cloning.
* more renaming for more explicit clones
* org -> orig
* allclose, fix orig stuff
* don't use set_testing_parameters in the checks!
* minor fixes for allclose
* fix some test, add more tests on classes
* added the test using pickles.
* move assert_almost_equal_dense_sparse to utils.testing, rename to assert_allclose_sparse_dense, test it
* make assert_allclose_dense_sparse more stringent
* more allclose fixes
* run test_check_estimator on all estimators
* rename set_testing_parameters to set_checking_parameters so nose doesn't think it's a tests (and I don't want to import stuff from nose as we want to remove it)
* fix in set_checking_parameters so that common tests pass
* more fixes to assert_allclose_dense_sparse
* rename alg to clusterer, don't scream even though I really want to
* ok this is not a pretty strict test that runs check_estimator with and without fitting on an instance. I also check if ``fit`` is called on the instance that is passed.
* simplify test as they didn't help at all
* it works!!! omfg
* run check_estimator clone test only on one of the configs, don't run locally by default
* Add `slow_test` decorator and documentation
* run test_check_estimator only on some estimators
* fix diags in test for older scipy
* fix pep8 and shorten
* use joblib.hash for inequality check because the pickle state machine is weird
* Test get_params invariance in common estimator tests
Remove test_get_params_invariance() from `test_common.py` and add
test call to _yield_all_tests() in `estimator_checks.py` to make
sure that get_params(deep=False) of a given Estimator returns a
subset of get_params(deep=True).
Compared to test_get_params_invariance(), it is NOT tested anymore
whether the given Estimator has an attribute get_params since
class BaseEstimator in `base.py` defines such an attribute
for each Estimator.
Partially addresses issue #7533
Also related to issue #4465
* Move test_transformer_n_iter() to estimator_checks.py
Remove the test test_transformer_n_iter() from tests/test_common.py
and perform the test logic in utils/estimator_checks.py instead.
Specifically, the method _yield_transformer_checks() now yields
check_transformer_n_iter() as part of the set of tests for
transformers.
test_transformer_n_iter() tests that that transformers with an
attribute max_iter, return the attribute of n_iter at least 1.
Partially addresses latter part of issue #7533
* Move test_non_transformer_estimators_n_iter() to estimator_checks.py
Remove the test_non_transformer_estimators_n_iter() from
tests/test_common.py; perform the test logic in
utils/estimator_checks.py instead.
Specifically, the method _yield_non_meta_checks() now yields
check_non_transformer_estimators_n_iter().
test_transformer_n_iter() tests that that estimators that are not
transformers with an attribute max_iter, return the attribute n_iter
of at least 1.
NOTE: The current implementation makes said test run for more
estimators than before this commit.
For some of these estimators, the test fails. This needs to be addressed
(see FIXME in line 111-115 of utils/estimator_checks.py for a potential
place to start).
Partially addresses latter part of issue #7533
* Fix check_non_transformer_estimators_n_iter calls
test_transformer_n_iter() test is now only run for
estimators where the test is applicable.
Partially addresses latter part of issue #7533
* Run check_non_transformer_estimators_n_iter on multi-class estimators
To do this, use helper method multioutput_estimator_convert_y_2d.
Also remove multi_output parameter from
check_non_transformer_estimators_n_iter since this parameter is not
used anywhere and corresponding cases should be handled by said
helper method.
Also, some pep8 line length fixes.
* Fix documentation for n_iter tests
There was some confusion between attributes and parameters.
Also rename n_iter to n_iter_
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
- Previously params in a FeatureUnion or Pipeline were different
when deep=False and deep=True, making it impossible to set shallow
params during GridSearch (issue #4461)
- Added test to enforce deep=True results to be superset of deep=False.
- Updated deep get_param output in pipeline estimators with shallow params.
TST: Test estimators for get_params invariance
- Estimators that support get_params should always be consistent
in that get_params(deep=False) should be a subset of get_params(deep=True)
- Implemented test over all "normal" and "other" estimators provided by
all_estimators
- Ignoring grid_search estimators for now
TST: Amended init_pipeline test to only compare non-estimators
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.
Make sparsity check check everything.
don't test everything. That would be nice but is out of scope :-/
catch special case of no core samples in DBSCAN
add nonregression test for sparse dbscan with no core samples.