Commit Graph

101 Commits

Author SHA1 Message Date
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
Jan Hendrik Metzen f76e64c9c7 FIX Fix failing tests (doctest, order of hyperparameters, pairwise_kernels) 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen eb54b496d2 REF Removing theta_vars attribute from kernels and using Hyperparameter instances instead 2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen 3f1a0f1a5a TST Adding two unittests for testing GP kernels
test_kernel_versus_pairwise() checks that GP kernels can also be used as pairwise kernels.
test_set_get_params() checks that set_params()/get_params() is consistent with kernel.theta.
2015-10-19 18:07:14 +02:00
Jan Hendrik Metzen 65555b300b REF Renaming sigma_squared_n to alpha (consistency with Ridge) 2015-10-19 18:07:13 +02:00
Jan Hendrik Metzen c6db24e56f REF Several small changes based on @eickenberg's suggestions 2015-10-19 18:07:13 +02:00
Jan Hendrik Metzen a6d564b4bb TST Testing n_jobs option of GaussianProcessClassifier 2015-10-19 18:07:13 +02:00
Jan Hendrik Metzen adc7451201 PEP8 Fixing PEP8 issues in gaussian_process package 2015-10-19 18:07:13 +02:00
Jan Hendrik Metzen 768c81fd1b TST Further GP-related fixes 2015-10-19 18:07:13 +02:00
Jan Hendrik Metzen 1f7deb7f6a TST Extending testing of multi-class GP 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen 9929b37270 FIX Excluding WhiteKernel from one unit-test 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen 0fa050c72c TST Testing GPC for multi-class classification problems 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen 588cabfc46 TST Added test checking that GPR can deal with different outputs for same input 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen daa90c22d3 ENH Adding Matern kernel for Gaussian Processes 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen 2839f66933 REFACTOR normalize_y in GPR does not modify standard-deviation 2015-10-19 18:07:12 +02:00
Jan Hendrik Metzen 78caa0b5d0 TST Testing GPC with custom external optimizer 2015-10-19 18:07:12 +02:00