Commit Graph

100 Commits

Author SHA1 Message Date
Finn O'Shea 39db9c4eca DOC clarification to base.OutlierMixin.fit_predict method docstring (#12954) 2019-01-13 21:31:54 +11:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01: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
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Peter 24e46410bd FIX: clone behavior for estimator types (#12585)
Fixes #12521
2018-11-15 07:59:09 +11:00
Pradeep Reddy Raamana 1a61f50577 DOCS: noting y is present in one-class fit methods merely for API consistency (#11939) 2018-08-30 10:05:41 +10:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Wes Barnett 20cb37e8f6 DOC document "precomputed" kernel for KernelRidge (#11134)
* document "precomputed" kernel for KernelRidge

See #8445.

* fix doc for KernelRidge

use n_samples_fitted in score
2018-05-26 19:14:02 +10:00
Albert Thomas 49da6c87dd [MRG+1] Common tests for outlier detection estimators (#9270) 2018-02-17 22:40:03 +11:00
kyledrogo de0581aea7 TST Check estimator pairwise (#9701) 2017-11-14 09:09:19 +11:00
Joel Nothman 102620f8d1 [MRG] FIX bug in nested set_params usage (#9999) 2017-10-25 15:23:41 +02:00
Andreas Mueller 75763cfe78 FIX _BaseComposition._set_params with nested parameters (#9945) 2017-10-19 08:40:44 +11:00
Andreas Mueller 156a1f37a9 remove modification of warning registry for no reason (#9569) 2017-09-08 17:29:36 +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
Nikita Singh 1652a70919 [MRG] Updated title and versions supported in contributing documentation (#8824)
* Changed title and updated versions supported

* Added back a line

* Fixed definition of R^2

* Fixed 80 character limit!
2017-05-07 19:36:31 -07:00
Brian A. Alfano ee82c3f357 fixed spelling on comments in file (#8801) 2017-04-27 11:49:33 +02:00
Holger Peters 4493d37058 [MRG+1] Fix pickling bug due to multiple inheritance & __getstate__ (#8324)
Fixes #8316


* Don't use test classes to group tests

* only use formatting for parts of the string that change

* Flake 8 column limit

* Make the modification of the estimator more explicit in the tests

* As suggested in code review, prefer formatting over two literals

* Also assert, that __setstate__ overwriting works in mixin

* Remove cache property

* Use assertion functions from sklearn.utils.testing

* remove the protocol argument in tests

* Rename attributes to better convey their purpose

* Revert change of module in TreeNoVersion

* Adhere to column-limit

* changelog entry

* Fix commit message
2017-02-21 09:33:28 +11:00
Andreas Mueller 5c4b1bb231 [MRG+1] Housekeeping Deprecations for v0.19 (#7927)
* remove stuff to be removed 0.19

* more changes

* remove classes from 0.19 whatsnew

* remove _LearntSelectorMixin

* remove ProjectedGradientNMF, load_lwf_*

* minor fixes

* remove more copy from logistic regression path

* remove lda, qda from __init__.__all__

* remove pg solver in nmf from tests etc

* remove class_weight="auto" from tests

* doctest change for decision_function_shape="ovr"

* remove transfrom from tree test, minor fixes to tree tests

* some fixes in the tests

* undo changes in functions which still allow 1d input...

* also allow 1d in scale

* more test fixes...

* last test fixes in forest and tree

* svm default value change doctest failures

* pep8

* remove more class_weight="auto" stuff

* minor cosmetics in docstrings deprecated / removed behavior.

* say that store_covariance has been moved to __init__ in discriminant_analysis
2016-12-09 12:43:38 -05:00
Joel Nothman 8570622a44 [MRG+1] DOC insert spaces before colons in parameter lists (#7920)
* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as #7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
2016-11-25 10:59:22 +01:00
Josh Karnofsky 9551ec85ea DOC add spaces before colons in docstrings (#7589) 2016-10-06 14:01:12 +11:00
Andreas Mueller b4872fe30d [MRG] add warning when importing old or new pickle. (#7248) 2016-09-10 14:17:42 +02:00
Andreas Mueller 680ab517df [MRG + 2] remove complicated equality checks in clone as __init__ shouldn't touch anything. (#5540)
* BF: issue 5522 (cloning objects with pandas.Dataframe attributes)

* super conservative fix, pending GP and VBGMM fixes.

* TST improved test for df param

* add deprecation warning, add whatsnew entry

* fixed place of deprecation warning, added test for deprecation warning.

* pep8

* fix whitespace error
2016-09-08 10:07:11 +10:00
jonathan.striebel 9cef05faf5 documentation: fixing typo (#6938)
the documentation of the form of regular and nested parameters in set_params is corrected
2016-06-24 21:05:41 +02:00
Loïc Estève ccefc2ec32 Fix sklearn.base.clone for all scipy.sparse formats (#6910) 2016-06-21 23:24:42 +10:00
Thierry 0625e0384e Integration of the new GaussianMixture class.
Depreciation of the GMM class.

Modification of the GaussianMixture class.
  Some functions from the original GSoC code have been removed, renamed or simplified.
  Some new functions have been introduced (as the 'check_parameters' function).
  Some parameters names have been changed :
   - covars_ -> covariances_ : to be coherent with sklearn/covariances
  Addition of the parameter 'warm_start' allowing to fit data by using the previous computation.

The old examples have been modified to replace the deprecated GMM class by the new GaussianMixture class.
Every exemple use the eigenvectors norm to solve the scale ellipse problem (Issues 6548).

Correction of all commentaries from the PR
- Rename MixtureBase -> BaseMixture
- Remove n_features_
- Fix some problems
- Add some tests

Correction of the bic/aic test.

Fix the test_check_means and test_check_covariances.

Remove all references to the deprecated GMM class.

Remove initialized_.
Add and correct docstring.

Correct the order of random_state.

Fix small typo.

Some fix in prevision of the integration of the new BayesianGaussianMixture class.

Modification in preparation of the integration of the BayesianGaussianMixture class.
Add 'best_n_iter' attribute.
Fix some bugs and tests.

Change the parameter order in the documentation.

Change best_n_iter_ name to n_iter_.

Fix of the warm_start problem.
Fix the divergence error message.
Correction of the random state init in the test file.
Fix the testing problems.

Update and add comments into the monotonic test.
2016-04-21 18:08:54 +02:00
Raghav R V a228016585 Leading underscores for warnings imported from sklearn.exceptions
in other modules where warnings are deprecated.

Prefix warnings imported from sklearn.exceptions instead of
suffixing to prevent showing both the suffixed warning
and the deprecated warning during tab completion.
2016-01-08 12:40:10 -05:00
Raghav R V 857cb09254 FIX/ENH Make the moved class resilient to the deprecation patching 2015-10-20 01:24:35 +02:00
Raghav R V 61ae8d56c4 MAINT move deprecated into deprecation.py 2015-10-19 22:35:36 +02:00
Raghav R V e3afc0e8c9 MAINT move custom error/warning classes into sklearn.exceptions
ENH NonBLASDotWarning -> EfficiencyWarning; Improve error message
DOC Add exceptions module to modules/classes.rst
MAINT Move ConvergenceWarning, UndefinedMetricWarning et al into exceptions
MAINT Remove ChangedBehaviorWarning from base
DOC/FIX Improve DataConversionWarning's docstring
2015-10-19 22:35:35 +02:00
Olivier Grisel 6966881328 MAINT use inspect.signature for introspection 2015-09-23 16:30:53 +02:00
Eric Larson cf2a875cd7 FIX: Fix for changing mode 2015-08-20 09:58:28 -04:00
banilo 3a82309d98 extend R^2 description 2015-07-12 01:25:52 +02:00
Joshua Loyal 9a4b75a7e3 ENH Document how to get valid parameters in set_params
Issue #4690
2015-06-11 23:25:57 +10:00
Andreas Mueller 6d4bcda876 ENH refactor OVO decision function, use it in SVC for sklearn-like decision_function shape 2015-06-05 13:14:45 -04:00
Olivier Grisel 1abb41a3ca DOC add comment for np.nan equality test in clone 2015-05-19 16:17:49 +02:00
Skipper Seabold 1bf81b1926 ENH: Avoid equality comparison for nans. 2015-05-18 11:40:47 -05:00
Andreas Mueller 669a4ea853 ENH add high-level estimator-validation function 2015-04-28 16:46:13 -04:00
Andreas Mueller d89c215013 Add tags to classifiers and regressors to identify them as such. 2015-03-31 19:59:49 -04:00
Raghav R V 24c0efd12f PEP8 Fix E112 and E113 errors 2015-01-08 04:00:28 +05:30
Lars Buitinck c453711bc6 MAINT big refactor of sklearn.cluster.bicluster
* Removed dead and useless code in the utils submodule;
* decoupled sklearn.base from the bicluster module (no more deep import);
* rewrote tests to test the API, not the implementation;
* added input validation to the get_submatrix method (but it still needs
  documentation, because I've no idea what to pass for data);
* got rid of the subdirectory when it turned out only one file was left.
2014-09-04 16:13:05 +02:00
Arnaud Joly c03b987a8a DOC typo + not forgetting single output case 2014-07-19 15:47:27 +02:00
Arnaud Joly 16870ffd46 ENH + DOC set a default scorer in the multiclass module 2014-07-19 15:13:23 +02:00
Andreas Mueller 67b8601314 Minor fixes in the docs 2014-06-07 16:38:53 +02:00
Noel Dawe e9d660d80c add sample_weight to base score and weight_boosting staged_score 2014-04-21 10:52:31 +02:00
Olivier Grisel 90ce739061 FIX: more robust skip of implicit constructor
Parameter introspection requires introspecting the keyword arguments of the
constructor of Python classes deriving from BaseEstimator.

This can be problematic for classes that do not override the default
constructor. Introspecting the implicit constructor used to raise a TypeError
but this is no longer the case in Python 3.4+. Hence with use a explicit check
for the implicit constructor prior to using inspection.
2014-03-26 11:06:15 +01:00
Joel Nothman ffd1e9aaa9 FIX remove confusing BaseEstimator.__str__ 2014-01-14 13:16:45 +11:00
Guilherme Trein 912d550f5c Fix exception message when cloning a estimator that does not implement 'get_params' method. 2013-12-08 23:16:23 -05:00
Lars Buitinck 7643f44d07 DOC add sklearn.base to generated docs
Fixes #1449.
2013-12-05 13:03:43 +01:00
Lars Buitinck 0d2c8c17e8 DOC improve biclustering docstrings
I had to figure out by experimentation what the methods were doing.
2013-09-30 12:33:24 +02:00