Commit Graph

78 Commits

Author SHA1 Message Date
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Nicolas Hug 2955d9f0af
API kwonly for neighbors module (#17004) 2020-04-24 14:22:09 -04:00
Thomas J Fan 6717c6afa0
API Deprecate positional arguments in semi_supervised module (#16974)
* API Keyword only for semi_supervised

* CLN Address comments
2020-04-22 23:14:06 +02:00
Alex Henrie 438bb3a438
MNT Remove unused imports (#16665) 2020-03-11 10:01:51 +11:00
Nicolas Hug d205638475
MNT Introduction of n_features_in_ attr with _validate_data mtd (#16112) 2020-02-29 09:05:11 -05:00
SHUBH CHATTERJEE 594fc85022 DOC fix docstring in semi_supervised module following doc guideline (#16042) 2020-01-13 12:40:32 +01:00
ngshya 50d3fe963c FIX avoid division by 0 warning in LabelPropagation (#15946) 2020-01-09 19:12:25 +01:00
Niklas d163d5ad94 FIX use safe_sparse_dot for callable kernel in LabelSpreading (#15868) 2019-12-27 03:31:09 -06:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Thomas J Fan 32e9911c99 MNT Fix uncaught deprecation imports (#15348) 2019-10-24 09:31:55 +11:00
Thomas J Fan e7de9b4cfe MNT Make modules private in semi_supervised (#15317) 2019-10-22 11:39:28 +08:00
Adrin Jalali 0eebade264 DOC docstring (shape= -> of shape) (#14640) 2019-10-02 20:54:32 -04:00
Samesh Lakhotia 3aafaa97f3 MAINT Fix assert raises in sklearn/semi_supervised/tests/ (#14841) 2019-09-07 21:35:40 -04:00
Andreas Mueller 03ea20db0f Fix mixin inheritance order, allow overwriting tags (#14884) 2019-09-05 10:13:30 +02:00
Andreas Mueller 92af3dabbb MAINT simplify check_is_fitted to use any fitted attributes (#14545) 2019-08-13 22:09:07 +02:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Thomas J Fan 2e7e06b78f [MRG] Doctest with print change only adjusts default options for doctest (#13991) 2019-06-01 10:53:45 +02:00
Zijie (ZJ) Poh 473fd5a747 DOC Label Spreading clumping factor must be in (0, 1) (#13015) 2019-01-19 21:43:59 +11:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Roman Yurchak acb8106472 MNT Use list and dict comprehension (#12668) 2019-01-08 09:32:34 +11:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02: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
Hanmin Qin 9b8fd0b0d0 DOC Correct default n_jobs & reference the glossary (#11808)
Also improves the glossary entry for n_jobs.
2018-08-18 19:57:10 +10:00
Olivier Grisel 40e6c43cb4
Joblib 0.12.2 (#11741)
* joblib 0.12.2

* Export _joblib's register_parallel_backend

* Use latest version of coverage
2018-08-03 12:34:25 +02:00
Naoya Kanai 774ae89306 [MRG] Fix numpy FutureWarning (#11704) 2018-07-30 17:40:46 +10:00
Akash Shivram 1879a50ba2 [MRG+1] Missing import in semi supervised learning label propagation example (#10496) 2018-01-21 22:40:19 +08:00
Loïc Estève f6163e73f8 Make scipy.sparse.csgraph imports explicit (#10145)
This can cause problems in scipy 1.0
2017-11-15 14:10:58 -08:00
Utkarsh Upadhyay 6d4ae1b61e FIX Convergence warning and n_iter_ in LabelPropagation (#5893) 2017-08-07 09:12:44 +10:00
Utkarsh Upadhyay a4fe183404 Increase the max_iter for LabelPropagation. (#9441)
LabelPropagation converges much slower than LabelSpreading. The default
of max_iter=30 works well for LabelSpreading but not for
LabelPropagation.

This was extracted from #5893.
2017-07-27 15:47:13 +02:00
(Venkat) Raghav, Rajagopalan b6f8865b0a [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (#9206)
* add automatic test of docstrings for function / method signatures using numpydoc
2017-07-11 18:42:10 +02:00
Utkarsh Upadhyay 0dc22798e7 [MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.
2017-07-04 08:20:52 +10:00
Vlad Niculae 738053e657 [MRG+2] MAINT: no longer backport graph_laplacian, use scipy one (#9077) 2017-06-09 16:23:55 +02: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
Utkarsh Upadhyay 070093ed76 [MRG] ENH: Allow specifying arbitrary kernel for semi-supervised learning. (#5762) 2016-09-21 21:00:24 +10:00
Gael Varoquaux 1837224751 Merge pull request #6613 from nelson-liu/correct_license_spelling
[MRG+1] DOC: fix spellings of 'license'
2016-06-15 13:58:59 +02:00
Thierry Guillemot 78a674875e Correct the deprecation of the random_integers numpy function. (#6712) 2016-04-26 16:08:48 +02:00
Nelson Liu d2aaf0f4bb doc: fix spellings of 'license' 2016-03-31 17:25:31 -07:00
ldavid dd85a67211 Add parallelism to multiple algorithms
Update kneighbors_graph()

   Add n_job attribute.

 Update Isomap

   Add n_job attribute to Isomap.__init__ method.

 Conform isomap.py to pep8.

 Conform graph.py to pep8.

 Update dbscan_.py

    Add n_jobs parameter to dbscan function and DBSCAN.__init__ method.
    Refactor DBSCAN.__init__ documentation.

 Update mean_shift_.py

    Add n_jobs parameter to estimate_bandwidth function.
    Propagate existing n_jobs parameter in mean_shift to estimate_bandwidth and NearestNeighbors.

 Conform mean_shift_.py to pep8.

 Conform locally_linear.py to pep8.

 Add n_jobs parameter to SpectralClustering.__init__ method.

 Add n_jobs parameter to SpectralEmbedding.__init__ method.

 Update usage of barycenter_kneighbors_graph function.

 Conform spectral_embedding_.py to pep8.

 Update label_propagation.py

    Conform to pep8.
    Refactor imports.
    Add n_jobs parameter to LabelSpreading.__init__ method.

 Update dbscan function call.

    Remove n_jobs argument from dbscan call, as it is already being given by self.get_params().

 Add n_jobs parameter to KernelPCA.__init__ method.

 Update KernelPCA construction in Isomap.
 Remove unnecessary parentesis in isomap.py:211,29.

Update docs: pipeline.rst

Revert "Fix n_jobs usage"

This reverts commit 9480630a69bbb68b01d1176d476222fc665cdd1e.

Fix usage of n_jobs property in Isomap
2016-02-11 15:44:25 -02:00
Jiali Mei 85223b9bcc a common test to check if classifiers fail when fed regression targets 2015-10-14 14:46:13 -04: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
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Raghav R V b3fbccca38 FIX various mismatch between docstring and signature params
DOC max_iterations -> max_iter. Make it consistent with kmeans

MAINT Replace the deprecated dx parameter with d in the docstrings

MAINT Deprecation warning for max_iterations parameter.
2015-01-16 11:54:57 -05:00
Raghav R V abd31d2cad MAINT Make uniform the error raised for not fitted condition 2015-01-12 00:33:40 +05:30
Joel Nothman b3bdb08964 DOC fix formatting of attributes etc. in docstrings 2014-07-28 19:04:59 +10:00
MechCoder c838c382b9 FIX: Preserve public API by introducing return_n_iter param 2014-07-22 15:09:39 +02:00
MechCoder bbb140aaf0 ENH: Added n_iter_ parameters across all iterative solvers 2014-07-22 15:09:39 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
Gael Varoquaux 7768a3059b ENH: enable y to only implement the array interface
For instance y could be a pandas' dataframe
2014-07-17 11:44:07 +02:00
Lars Buitinck fed4692e40 TST skip flaky label propagation test
The optimization in 46aebf132b broke
a test that relied on the exact ordering of k-NN in a test on a minute
dataset.
2014-06-01 16:34:48 +02:00
Lars Buitinck c997cdee9f COSMIT pep8 + full stop police
metrics/tests/test_score_objects.py made stricter by replacing . with \.
in regular expressions.
2014-02-01 15:28:53 +01:00