Commit Graph

706 Commits

Author SHA1 Message Date
Zijie (ZJ) Poh bb3f93c8b3 API NMF and non_negative_factorization have inconsistent default init (#12989) 2019-01-30 08:12:21 +08:00
Prabakaran Kumaresshan db17f3e222 FIX Parallelisation of decomposition/sparse_encode (#13005) 2019-01-20 20:37:29 +11:00
Thomas Fan 7bc20c0e50 DOC Minor changes to DOCS to address sphinx warnings (#12999) 2019-01-17 17:49:31 +08: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
Nicolas Hug a50c03f975 [MRG] Add pprint for estimators - continued (#11705)
* add pprint for estimators

* strip color from length, add color option

* Minor cleaning, fixes, factoring and docs

* Added some basic tests

* Fixed line length issue

* fixed flake8 and added visual test for review

* Fixed test

* Fixed Python 2 issues (inspect.signature import)

* Trying to fix flake8 again

* Added special repr for functions

* Added some other visual tests

* Changed _format_function in to _format_callable

because callable() returns True also for class objects (which we want to
reprensent with their name as well anyway)

* Consistent output in Python 2 and 3

* WIP

* Now using the builtin pprint module

* pep8

* Added changed_only param

* Fixed printing when string would fit in less than line width

* Fixed printing of steps parameter

* Fixed changed_only param for short estimators

* fixed pep8

* Added some more description in docstring

* changed_only is now an option from set_config()

* Put _pprint.py into sklearn/utils, added tests

* Added doctest NORMALIZE_WHITESPACE where needed

* Fixed tests

* fix test-doc

* fixing test that passed before....

* Fixed tests

* Added test for changed_only and long lines

* typo

* Added authors names

* Added license file

* Added ellipsis based on number of elements in sequence + added increasinly aggressive repr strategies

* Updated whatsnew

* dont use increaingly aggressive strategy

* Fixed tests

* Removed LICENSE file and put license text in _pprint.py

* fixed test_base

* Sorted parameters dictionary for consistent output in 3.5

* Actually using OrderedDict...

* Addressed comments

* Added test for NaN changed parameter

* Update whatsnew

* Added example to set_config()

* Removed example

* Added example in gallery

* Spelling
2018-12-19 23:48:21 -05:00
Hanmin Qin 4a7075aa88 Revert "DOC Added example to decomposition.DictionaryLearning (#12799)"
This reverts commit fec534a993.
2018-12-19 11:38:30 +08:00
Joel Nothman 2e98a9ca8d
Reduce precision requirements for float32 PCA (#12825)
Fixes #12823
2018-12-19 14:33:55 +11:00
Reshama Shaikh fec534a993 DOC Added example to decomposition.DictionaryLearning (#12799) 2018-12-19 07:40:56 +08: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
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +11:00
melsyt 82e095ce95 DOC generative model description etc for LatentDirichletAllocation (#12216) 2018-11-18 20:46:17 +11:00
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Ming Li 1c88b3c9c7 Fix IncrementalPCA when final batch is smaller than dimensions required for SVD (#12379) 2018-10-31 14:32:19 +01:00
Nicolas Hug 4e2da4af92 [MRG] Added FutureWarning in sgd models for tol parameter (#12399)
* Added ChangedBehaviorWarning in sgd models

if tol is None while max_iter is set

* Changed to FutureWarning and clarified None meaning

* Ignored warningin tests

* Ignore warnings in tests, round 2
2018-10-24 11:00:43 -04: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
TakingItCasual f4e7d2b19a Converting http to https (3)... (#12302) 2018-10-05 18:50:31 +02:00
TakingItCasual 74b56dbc57 MNT Converting http to https (#12277) 2018-10-04 22:37:57 +08:00
Roman Yurchak e0e7387606 Remove unused private functions (#12253) 2018-10-03 21:08:17 -04:00
Zijie (ZJ) Poh dad5c36c5e DOC Fix docstring inconsistency in nmf.py (#12063) 2018-09-13 17:01:43 +08:00
jakirkham e00817db38 MNT: Use `nrm2` to find the residuals squared (#11923) 2018-08-31 10:43:24 +10:00
Adrin Jalali 18af51408d DOC examples added to sklearn.decomposition classes (#11775) 2018-08-18 19:50:10 +03:00
jakirkham 4752ea7def MNT: Use nrm2 to validate and normalize atoms in dictionary learning (#11845) 2018-08-18 19:20:51 +03:00
jakirkham 7448985735 MNT: Drop unneeded transpose (#11850)
One of the vectors being passed to `np.dot` was being transposed.
However this is a no-op on a vector (though it may create a view). Given
this, drop the unneeded transpose.
2018-08-18 23:50:08 +10: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
jakirkham d25529d4d8 MNT: Drop unneeded stride workaround for sum in dict_learning (#11841) 2018-08-17 17:26:52 +03: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
jakirkham ff773fb2a6 [MRG] MNT: Skip array check in dict_learning_online (#11690) 2018-07-29 13:31:50 +10:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Ivan PANICO 6eb19831d1 BUG: centering and fixing scaling issue in SparsePCA (#11585) 2018-07-21 00:00:15 +02:00
jakirkham fc3a6ccdef [MRG] Use GEMM in _update_dict (#11420)
* Use BLAS GEMM routine to compute residuals
2018-07-18 10:03:31 +02:00
Loïc Estève 1a27160694 TST fix test collections problems on Python 2.
ignore_warnings seems to interact badly with pytest.mark.parametrize.
2018-07-18 00:03:37 +02:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Joel Nothman 14e7c328df Restructure access to vendored/site Joblib (#11471)
In order to fix #11408, this swaps `joblib` and `_joblib`. It however, allows users to access joblib's `Memory` or `Parallel` functionality without accessing `sklearn.externals._joblib` by importing `Memory`, `Parallel`, etc. into `sklearn.utils`.
2018-07-17 18:02:11 +02:00
Andreas Mueller b25e222328 MNT misc sphinx website build fixes and dead links (#11532) 2018-07-16 09:13:20 +08:00
jakirkham bc07078b76 MNT: Use NumPy clip's instead of assigning mask (#11474) 2018-07-10 22:36:38 +02:00
jakirkham e43e00adb3 MNT Use `clip` to make dictionary and/or code positive in dict_learning (#11468) 2018-07-10 19:09:20 +00:00
Nicolas Hug 175bedbba1 DOC Fixed doc issues for decomposition and feature_extraction modules (#11413) 2018-07-04 21:34:55 +08:00
josephsalmon ee264ce0d5 Update pca.py references. (#11375) 2018-06-28 12:04:51 +02:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
jakirkham 62301aa81b FIX: Ensure dictionary is writeable in dict_learning_online (#11342)
As the `dictionary` in `dict_learning_online` can be supplied by the user and we intend to write to it, ensure that it is writable before proceeding. This is needed as `dict_learning_online` will overwrite data in `dictionary` as it runs. Tweak an existing test to initialize `dict_learning_online` with a read-only `dictionary` and ensure it will reach code that tries to write to the read-only `dictionary` (unless we ensure it is writeable).
2018-06-24 00:06:55 +10:00
Olivier Grisel 174f4aea6e
[MRG] FIX SparseCoder with readonly parallel mmap (#11346) 2018-06-23 12:16:59 +02:00
jakirkham 5b29ae6d2c MNT: Rename variable `n_samples` to `n_features` (#11344) 2018-06-22 09:56:41 +02:00
jakirkham e3cf0202c9 DOC: Version added positivity in dict_learning (#11341) 2018-06-22 10:56:22 +10:00
jakirkham 6ce497c3bc [MRG] ENH: Optional positivity constraints on the dictionary and sparse code (#6374)
* ENH: Add positivity option for code and dictionary

Provides an option for dictionary learning to positively constrain the
dictionary and the sparse code. This is useful in applications of
dictionary learning where the data is know to be positive (e.g. images),
but the sparsity constraint that dictionary learning has is better
suited for factorizing the data in contrast to other positively
constrained factorization techniques like NMF, which may not be
similarly sparse.

* TST: Test positivity with code and dictionary

Ensure that when the positivity constraint is applied that the
dictionary and code end up having only positive values in the respective
results depending on whether dictionary and/or code are positively
constrained.

* DOC: Positivity constraints dictionary learning

Shows the various positivity constraints on dictionary learning and what
the results of these look like using a Red to Blue color map. These are
included in the examples and also in the docs below dictionary learning.
All of these use the Olivetti faces as a training set.
2018-06-21 16:36:48 +02:00
Guillaume Lemaitre 5718466bb5 [MRG] ENH: Ignore NaNs in StandardScaler and scale (#11206) 2018-06-21 15:48:38 +02:00
Nilesh Kevlani bb385394b8 [MRG+1] Added _fit_svd_solver variable to PCA (#11225) 2018-06-13 07:28:07 +00:00
Roman Yurchak 03b5d83f5a TST Check consistency between PCA and TruncatedSVD on centered data (#11193) 2018-06-06 17:05:24 +02:00