Commit Graph

52 Commits

Author SHA1 Message Date
Jérémie du Boisberranger c35a719fe8
MAINT Clean up deprecations for 1.5: in AdditiveChi2Sampler (#28814) 2024-04-26 17:51:47 +02:00
Puneeth K aafe31ff2e
TST add missing assert statement (#27677) 2023-10-30 09:39:50 +01:00
Guillaume Lemaitre 0d701e8fef
MAINT use .toarray instead of .A that is deprecated (#27367)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2023-09-14 13:08:35 +02:00
Lohit SundaramahaLingam f1ab4cee5d
TST Extend tests for `scipy.sparse.*array` in `sklearn/tests/test_kernel_approximation.py` (#27301)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
2023-09-12 06:52:13 +00:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Vincent M e010e4f007
MAINT make `AdditiveChi2Sampler` stateless and check that stateless `Transformers` don't raise `NotFittedError` (#25190)
* MAINT make AdditiveChi2Sampler stateless

* apply feedbacks

* fix tests

* apply new suggestions

* typo

* iterate on tests

* typo in docstring

* fix docstring

* update changelog

* improve test coverage

* add test_common

* improve coverage by removing  from test_common

* move stateless check into _yield_transformer_checks

* apply suggestions

* Apply suggestions from code review

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

* apply suggestions

* Update doc/whats_new/v1.3.rst

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2023-01-18 18:14:18 +00:00
Gleb Levitski 61ae92a778
ENH Add gamma='scale' option to RBFSampler (#24755)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-10-28 13:11:56 +02:00
Tim Head 92f555ea15
ENH Preserves dtype in `RBFSampler` (#24317)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-09-09 14:38:44 +02:00
Rahil Parikh 1eea19d2dc
ENH Add dtype preservation to SkewedChi2Sampler (#24350)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-09-09 11:22:59 +02:00
Stefanie Molin 9bb45255d9
MAINT Parameter validation for `PolynomialCountSketch` (#24217)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-08-31 16:36:45 +02:00
Jérémie du Boisberranger 84f8409dc5
TST Speed-up test_polynomial_count_sketch (#23189)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2022-05-13 17:43:52 +02:00
Shuangchi He 2e3abc2e32
MAINT Fix some typos (#23251) 2022-04-30 15:03:40 -04:00
Thomas J. Fan 67a3feed2f
ENH Adds get_feature_names_out for AdditiveChi2Sampler (#22137)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-08 15:02:18 +01:00
Thomas J. Fan d616e43947
ENH Adds feature_names_out for most of kernel_approximation (#22694) 2022-03-08 14:01:03 +01:00
kxytim 6600994d84
FIX incorrect `component_indices_` in Nystroem (#20554)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-09-02 16:14:36 +02:00
Olivier Grisel f1bbfbce4f
TST Avoid raising a spurious warning in test_kernel_approximation.py (#20513) 2021-07-13 10:53:42 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Alihan Zihna a44653fb34
TST Changes assert to pytest style in test_config.py and test_kernel_approximation.py (#19845) 2021-04-09 11:40:37 +02:00
Daniel López daebcac781
FEA Add PolynomialCountSketch to Kernel Approximation module (#13003)
* Add Tensor Sketch algorithm

* Add user guide entry

* Add example

* Add benchmark

Co-authored-by: Christian Lorentzen <lorentzen.ch@googlemail.com>
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-08-18 08:44:20 +02:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +01:00
Sebastian Kießling 8666f570e4
[MRG] Add requires_positiv_X tag to AdditiveChi2Sampler (#16332)
* add tag requires postivie X

* add check_non_negative to additivechi2Sampler

* add test for right error message in additive chi2 sampler

* change test upon suggestion
2020-02-01 12:29:09 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Venkatachalam N e55e37c4ac FIX Nystroem failing with precomputed kernel (#14706) 2019-08-28 14:43:48 -07:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04: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 0f94f2962b
MNT simple deprecations and removals for 0.21 (#12238)
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
2018-10-11 14:56:37 -04:00
Andreas Mueller 896f9d97cf Fix handling of Nystroem params with a callable kernel (#9166) 2017-06-30 18:16:10 +02:00
Romain Brault 15b7d47a2f relax skewness assumption (#7573)
relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

last corrections

whats_new

merge

complying whats_new

removed unnecessary _assert_X

increased coverage

relax skewness assumption

relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

relax skewedness assumption

last corrections

whats_new

merge

complying whats_new

removed unnecessary _assert_X

increased coverage

remove cythonize.dat and merge

simplify tests

simplify tests
2017-05-18 14:17:10 -04:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08: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 8db11a8c74 Make nystroem approximation robust to singular kernel. 2015-01-29 12:11:52 -05:00
Dougal J. Sutherland f0f26bce33 fix factor of 2 in RBFSampler; make test more rigorous
http://nbviewer.ipython.org/gist/dougalsutherland/11fd9895924c3c1aed19
demonstrates the problem in pictures.
2014-09-22 18:19:40 -04:00
Sebastian Saeger 5ebba54259 Fix the pep8 violations 2014-04-17 20:50:07 +02:00
Sebastian Saeger f014b69495 Add tests for the sample_interval in #3069 2014-04-17 00:57:26 +02:00
Lars Buitinck 61142601d8 FIX input validation in Nystroem
Minimal, so we can later add support for dtype=object and custom kernels
on strings, trees, graphs, etc.
2014-03-05 13:14:46 +01:00
Lars Buitinck 9a9b9e85ed DOC+COSMIT: typos, lots of them
Fixes #2102. There's one typo left in joblib which is better fixed
upstream.
2013-09-13 16:29:42 +02:00
Lars Buitinck b41eae2318 COSMIT rm repetitive __main__ blocks from tests
These may seem convenient, but they have to updated along with the tests
and can give a false sense of security when that doesn't happen.
2013-03-18 15:28:46 +01:00
JakeMick 5f6c0db2db TST added test of fit and transform for kernels for nystroem 2013-03-18 12:51:57 +01:00
Lars Buitinck 66eb410bdd BUG + DOC fix Nystroem for other kernels than RBF
Fixes #1785, #1786.
2013-03-18 12:51:50 +01:00
Andreas Mueller f52e8116b8 TST better coverage in kernel_approximation 2012-12-12 22:09:08 +01:00
Andreas Mueller f3e8fb840e ENH tests for Nystrom, check that n_components is smaller than n_samples. 2012-12-09 14:14:09 +01:00
Mathieu Blondel afb666c1d0 Use sklearn.utils.testing in tests. 2012-10-25 15:31:35 +09:00
Lars Buitinck 11e9842987 ENH scipy.sparse support in additive chi² sampler 2012-06-23 14:04:04 +02:00
Andreas Mueller eeb6dcc4cc ENH use random states everywhere, never call np.random. 2012-05-06 18:35:14 +02:00
Mathieu Blondel e3ed8e0a0e Use rbf_kernel. 2012-01-10 13:35:15 +09:00
Lars Buitinck 872e70d9b7 BUG input validation in kernel approximations + pep8
Note: SkewedChi2Sampler no longer accepts sparse matrices.
It shouldn't, because it destroyed the sparseness anyway.
2011-12-24 21:21:23 +01:00
Andreas Mueller 3a6e490e05 COSMIT pep8 2011-12-23 19:12:52 +01:00
Andreas Mueller 48be642417 ENH better testing 2011-12-20 14:17:50 +01:00