Commit Graph

116 Commits

Author SHA1 Message Date
Maren Westermann 0550793bd6
FIX inconsistent hyperparameter and bounds issue in GP kernels (#17946) 2020-07-18 11:27:31 +02:00
SylvainLan 8f63e9144f
FIX Add warning for GP's hyperparameters (#12673)
* Add a warning for GP Regressor if optimized hyperparameter matches one of its bounds

* pep8 fix

* Add a test and use np.isclose

* More verbose warning message

* remove print

* Ad a more precise warning and update tests

* fix warning and update tests

* fix test dims

* fix multiple dimensions test

* fix pep8

* change variable name

* add warning for GP classifier

* tests for gpc

* pep8 fix

* put the warning in a function

* add comment to warning function

* update name in gpr and gpc

* update whats_new

* update whats_new

* update whats_new

* remove merge conflict text

* add WhiteKernel

* put the log in the last version
2020-07-17 10:28:17 +02:00
Nicolas Hug ac8cbb3799
[MRG] More deprecation for 0.24 (#17142)
* normalize_components in sparsePCA

* changed default strategy of Dummy to prior and removed outputs_2d ttribute

* removed usage of None to drop estimator in ensemble and behaviour param of IsolationForest

* remove support for drop=None in Voting

* removed some warning decorators

* remove feature_extraction.extract_patches

* removed VectorizerMixin and copy parameter from TFIDFVectorizer

* kernel.set_params now raises attributeerror

* removed fig from plot_partial_dependence

* removed iid parameter of search estimators

* removed brier_scorer

* raise error in split when shuffle is False and random_state is not None

* removed MultiOutputEstimator

* removed base classes of NaiveBayes

* removed drop from pipeline

* removed utils in random_projection

* removed presort and classes_ in trees

* flake8

* fixed some tests

* flake

* fixed docstring

* fixed other one

* some left

* mmmm
2020-05-20 16:04:14 -04:00
Pete Green 4c29be44fa
FIX Predicted standard deviation values of Gaussian Processes are only within [0, 1] (#15782)
* Initial work for WIP pull request

* First commit of full solution and new tests

* Changes from PR review

* Updated changelog and normalize_y description

* Updating v0.23.rst with upstream master

* Small update to whatsnew

Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
2020-02-25 09:53:50 +01:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +01:00
Adrin Jalali 42706ebf2d
MNT CI dropping python-3.5 (#15106)
* dropping python-3.5

* fix install guide

* fix setup.py

* fix circleci

* advanced_installation

* index.html

* readme

* pyparsing.py

* remove clean_warning_registry

* 1.13.1 and 1.19.1

* don't use 16.04

* 18.04 libatlas-dev -> libatlas-base-dev

* min pillow version for 3.6 is 4.2.1

* echo commands

* fix conflict, and 32 bit

* fix conflict for circle

* fix scikit-image version dep

* mark tests as xfail on 32bit py3.6

* move to 1.13.3 min numpy version, and simplify old code

* remove the rest of _object_dtype_isnan usages

* Revert "remove the rest of _object_dtype_isnan usages"

This reverts commit c6e867ea1f.

* fix issues raised by jeremy

* minor fix

* minor fixes mentioned by Olivier
2020-02-10 12:28:42 +01:00
Reshama Shaikh e1f7b631ce ENH Allow usage of nu=inf in Matern kernel (#15972)
Co-authored-by: Sam Dixon <sam.dixon@berkeley.edu>
2019-12-26 12:04:54 +01:00
Yu-Hang "Maxin" Tang 8360786895 ENH Allowing Gaussian process kernels on structured data (#15557) 2019-11-15 16:07:36 -08:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
SylvainLan a7a834bdb7 ENH improved error anisotropic RationalQuadratic kernel (#12603) 2019-08-08 18:22:00 +10:00
Masashi SHIBATA ec9b11b077 ENH Add clone_kernel option to make gaussian process model (#14378) 2019-07-31 14:02:10 +02:00
Joel Nothman 0279108bef
API don't default get_params output to None in the future (#14464) 2019-07-28 23:37:47 +10:00
Nicolas Hug f3eb9d2206 [MRG] MNT removing assert_equal, etc -- continued (#14232) 2019-07-02 14:53:51 +10:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Roman Yurchak 5674122c97 MAINT More test runtime optimizations (#14136)
* Feature extraction / feature selection

* Metrics, manifold, impute, GP optimization

* Optimize mixture

* Optimize model_selection

* Fix tests

* Lint
2019-06-22 10:44:06 +03:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01: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
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Shangwu Yao cb1dbc25a7 MNT: reduce the number of warnings in test_common.py (#11151)
Improve handling of warning filters in sklearn.utils.testing by avoiding to reset warnings.filters.
2018-06-11 08:59:12 +02:00
Roman Yurchak f049ec72eb TST Pytest parametrization part3 - feature_extraction, gaussian_process modules (#11143) 2018-06-04 22:23:29 +08:00
Roman Yurchak d9a0774afc MAINT Always import signature from sklearn.utils.fixes (#11019) 2018-04-24 09:27:45 +10:00
Minghui Liu 6e01feff14 OPTIM make GaussianProcessRegressor faster with return_std=True 2017-09-01 13:13:12 +02:00
Loïc Estève 846313b570 [MRG+1] Deprecate sklearn.utils.testing.raises and remove it from tests (#9660) 2017-09-01 12:53:59 +02:00
Manoj Kumar ec0dbf0399 [MRG+1] Fixes predicting std and cov without fitting in GPR by default. (#9177)
* If self.kernel_ is None then self.kernel_ is set to RBFKernel in predict() as fit(). Fixes #6573

* xxx_ attributes can not be altered outside fit. Removing self.kernel_ from predict() and using previously implemented self.kernel attribute.

* Cleanup and add non-regression-test
2017-06-25 15:32:16 -07:00
Thomas Moreau 8dde4096bd [MRG] ENH make rng seed thread safe everywhere it is possible (#9184)
* ENH make rng seed thread safe everywhere it is possible

* ENH remove unneeded use of np.random.seed
2017-06-23 07:40:33 +02:00
Aman Dalmia fa82eee82f [MRG+1] Better error message for GPR (#8386)
* FIX: better error message for GPR

* TST: added tests for error message

* FIX: correct error message and simplified tests

* DOC: updated docstring for GPR

* FIX: pass float as value for alpha

* Raise original error after modification to preserve traceback

Amend test accordingly
2017-06-08 15:06:48 +10:00
Namiya 39076ff385 fix deprecated comparison to string in GP (#8518) 2017-03-04 13:37:11 -08:00
Loïc Estève 0ec6664ff1 [MRG] Make tests runnable with pytest without error (#8246)
* Make tests runnable with pytest without error.

Errors were due to pytest quirks with (deprecated) yield support.

* Add pytest build on Travis

and tweak pytest settings in setup.cfg

* Tweak comment
2017-02-20 13:08:09 +01:00
Paul Ganssle 9f6b849c35 TST Change rstrip() to truncation in test function (#8237) 2017-01-27 08:41:03 +11:00
Andreas Mueller 4da44c8541 [MRG+1] replaced some assert_true(np.allclose(x, y)) with assert_almost_equal (#7742)
* replaced some assert_true(np.allclose(x, y)) with assert_almost_equal for better error messages.

also some pep8.

* typo fixes
2016-10-25 09:15:58 -04: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
Ruifeng Zheng e17d5c9337 [MRG] Fix GaussianProcess batch predict in Py3k #7329 (#7330)
* fix batch

* add test for eval_MSE
2016-10-06 14:07:40 +11:00
Mikhail Korobov 19aebe2431 use == instead of 'is' for string comparison (#7422) 2016-09-15 09:42:34 +10:00
Andreas Mueller 3d1a2fdb5c COSMIT don't use docstrings in tests (gp kernel tests) (#7399) 2016-09-13 13:17:38 +02:00
Manoj Kumar 49fb295561 [MRG+2] Fix repr on isotropic kernels when a 1-D length scale is given (#7259) 2016-09-03 22:02:07 +10:00
Manoj Kumar c31ad7ada3 [MRG + 1] [MAINT] Remove non-trivial logic during kernel initialization (#6963)
* Make sure set_params does not break clone on kernels

For example, in kernels such as RBF, using set_params with a
length_scale of different length, used to break clone because of
the non-trivial modification of length_scale in the constructor.

This PR resolves this by moving this logic to __call__ and
making hyperparameter attributes properties.

* Fix tests by using get_params and implement __eq__ for Hyperparameter

* Explain XXX

* Check that hyperparameters are equal after non-trivial set_params

* Refactor into _check_length-scale
2016-08-16 23:43:58 -07:00
Nelson Liu d2aaf0f4bb doc: fix spellings of 'license' 2016-03-31 17:25:31 -07:00
Andreas Mueller 1e5820b0ad Semantics of ``assert_almost_equal`` now consistent on floats and arrays. see https://github.com/numpy/numpy/issues/5200 2016-02-15 14:09:18 +01:00
giorgiop 58c859e7ba Limit the number of thread and force install libgfortran 2016-02-06 18:56:03 +01:00
giorgiop 6470a83f99 MAINT speed up test_kernels 2016-02-06 18:55:23 +01:00
giorgiop dd6ab4e896 MAINT speed up test_gpr 2016-02-06 18:55:23 +01:00
giorgiop 8d270fb40c MAINT speed up test_gpc 2016-02-06 18:55:22 +01:00
Raghav R V 8878088b19 FIX inspect.argspect is deprecated; use signature 2015-10-24 10:27:26 +02:00
Jan Hendrik Metzen cea3f29e0f TST test_lml_precomputed() checks only for equality in first 7 digits 2015-10-19 18:07:15 +02:00
Jan Hendrik Metzen 3957fc3b34 ENH GPR.log_marginal_likelihood() returns the current log-likelihood if no theta vector is provided 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen e2a340a4ee REF More meaningful names for hyperparameters of GP kernels 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen 2dd1f285b9 PEP8 Making pep8 and pyflakes happy 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen 98e8093c93 FIX Further python3 related fixes 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen 55d26aa9a6 FIX Fixing test_kernel_theta 2015-10-19 18:07:14 +02:00