8000 0.22.1 release (#15998) · BorgwardtLab/scikit-learn@2e162b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e162b2

Browse files
ogriselcgsavardjnothmanthomasjpfankwinkunks
authored andcommitted
0.22.1 release (scikit-learn#15998)
* DOC fixed default values in dbscan (scikit-learn#15753) * DOC fix incorrect branch reference in contributing doc (scikit-learn#15779) * DOC relabel Feature -> Efficiency in change log (scikit-learn#15770) * DOC fixed Birch default value (scikit-learn#15780) * STY Minior change on code padding in website theme (scikit-learn#15768) * DOC Fix yticklabels order in permutation importances example (scikit-learn#15799) * Fix yticklabels order in permutation importances example * STY Update wrapper width (scikit-learn#15793) * DOC Long sentence was hard to parse and ambiguous in _classification.py (scikit-learn#15769) * DOC Removed duplicate 'classes_' attribute in Naive Bayes classifiers (scikit-learn#15811) * BUG Fixes pandas dataframe bug with boolean dtypes (scikit-learn#15797) * BUG Returns only public estimators in all_estimators (scikit-learn#15380) * DOC improve doc for multiclass and types_of_target (scikit-learn#15333) * TST Increases tol for check_pca_float_dtype_preservation assertion (scikit-learn#15775) * update _alpha_grid class in _coordinate_descent.py (scikit-learn#15835) * FIX Explicit conversion of ndarray to object dtype. (scikit-learn#15832) * BLD Parallelize sphinx builds on circle ci (scikit-learn#15745) * DOC correct url for preprocessing (scikit-learn#15853) * MNT avoid generating too many cross links in examples (scikit-learn#15844) * DOC Correct wrong doc in precision_recall_fscore_support (scikit-learn#15833) * DOC add comment in check_pca_float_dtype_preservation (scikit-learn#15819) Documenting the changes in scikit-learn#15775 * DOC correct indents in docstring _split.py (scikit-learn#15843) * DOC fix docstring of KMeans based on sklearn guideline (scikit-learn#15754) * DOC fix docstring of AgglomerativeClustering based on sklearn guideline (scikit-learn#15764) * DOC fix docstring of AffinityPropagation based on sklearn guideline (scikit-learn#15777) * DOC fixed SpectralCoclustering and SpectralBiclustering docstrings following sklearn guideline (scikit-learn#15778) * DOC fix FeatureAgglomeration and MiniBatchKMeans docstring following sklearn guideline (scikit-learn#15809) * TST Specify random_state in test_cv_iterable_wrapper (scikit-learn#15829) * DOC Include LinearSV{C, R} in models that support sample_weights (scikit-learn#15871) * DOC correct some indents (scikit-learn#15875) * DOC Fix documentation of default values in tree classes (scikit-learn#15870) * DOC fix typo in docstring (scikit-learn#15887) * DOC FIX default value for xticks_rotation in plot_confusion_matrix (scikit-learn#15890) * Fix imports in pip3 ubuntu by suffixing affected files (scikit-learn#15891) * MNT Raise erorr when normalize is invalid in confusion_matrix (scikit-learn#15888) * [MRG] DOC Increases search results for API object results (scikit-learn#15574) * MNT Ignores warning in pyamg for deprecated scipy.random (scikit-learn#15914) * DOC Instructions to troubleshoot Windows path length limit (scikit-learn#15916) * DOC add versionadded directive to some estimators (scikit-learn#15849) * DOC clarify doc-string of roc_auc_score and add references (scikit-learn#15293) * MNT Adds skip lint to azure pipeline CI (scikit-learn#15904) * BLD Fixes bug when building with NO_MATHJAX=1 (scikit-learn#15892) * [MRG] BUG Checks to number of axes in passed in ax more generically (scikit-learn#15760) * EXA Minor fixes in plot_sparse_logistic_regression_20newsgroups.py (scikit-learn#15925) * BUG Do not shadow public functions with deprecated modules (scikit-learn#15846) * Import sklearn._distributor_init first (scikit-learn#15929) * DOC Fix typos, via a Levenshtein-style corrector (scikit-learn#15923) * DOC in canned comment, mention that PR title becomes commit me… (scikit-learn#15935) * DOC/EXA Correct spelling of "Classification" (scikit-learn#15938) * BUG fix pip3 ubuntu update by suffixing file (scikit-learn#15928) * [MRG] Ways to compute center_shift_total were different in "full" and "elkan" algorithms. (scikit-learn#15930) * TST Fixes integer test for train and test indices (scikit-learn#15941) * BUG ensure that parallel/sequential give the same permutation importances (scikit-learn#15933) * Formatting fixes in changelog (scikit-learn#15944) * MRG FIX: order of values of self.quantiles_ in QuantileTransformer (scikit-learn#15751) * [MRG] BUG Fixes constrast in plot_confusion_matrix (scikit-learn#15936) * BUG use zero_division argument in classification_report (scikit-learn#15879) * DOC change logreg solver in plot_logistic_path (scikit-learn#15927) * DOC fix whats new ordering (scikit-learn#15961) * COSMIT use np.iinfo to define the max int32 (scikit-learn#15960) * DOC Apply numpydoc validation to VotingRegressor methods (scikit-learn#15969) Co-authored-by: Tiffany R. Williams <Tiffany8@users.noreply.github.com> * DOC improve naive_bayes.py documentation (scikit-learn#15943) Co-authored-by: Jigna Panchal <40188288+jigna-panchal@users.noreply.github.com> * DOC Fix default values in Perceptron documentation (scikit-learn#15965) * DOC Improve default values in logistic documentation (scikit-learn#15966) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> * DOC Improve documentation of default values for imputers (scikit-learn#15964) * EXA/MAINT Simplify code in manifold learning example (scikit-learn#15949) * DOC Improve default values in SGD documentation (scikit-learn#15967) * DOC Improve defaults in neural network documentation (scikit-learn#15968) * FIX use safe_sparse_dot for callable kernel in LabelSpreading (scikit-learn#15868) * BUG Adds attributes back to check_is_fitted (scikit-learn#15947) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> * DOC update check_is_fitted what's new * DOC change python-devel to python3-devel for yum. (scikit-learn#15986) * DOC Correct the default value of values_format in plot_confusion_matrix (scikit-learn#15981) * [MRG] MNT Updates pypy to use 7.2.0 (scikit-learn#15954) * FIX Add missing 'values_format' param to disp.plot() in plot_confusion_matrix (scikit-learn#15937) * FIX support scalar values in fit_params in SearchCV (scikit-learn#15863) * support a scalar fit param * pep8 * TST add test for desired behavior * FIX introduce _check_fit_params to validate parameters * DOC update whats new * TST tests both grid-search and randomize-search * PEP8 * DOC revert unecessary change * TST add test for _check_fit_params * olivier comments * TST fixes * DOC whats new * DOC whats new * TST revert type of error * add olivier suggestions * address olivier comments * address thomas comments * PEP8 * comments olivier * TST fix test by passing X * avoid to call twice tocsr * add case column/row sparse in check_fit_param * provide optional indices * TST check content when indexing params * PEP8 * TST update tests to check identity * stupid fix * use a distribution in RandomizedSearchCV * MNT add lightgbm to one of the CI build * move to another build * do not install dependencies lightgbm * MNT comments on the CI setup * address some comments * Test fit_params compat without dependency on lightgbm Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> * Remove abstractmethod that silently brake downstream packages (scikit-learn#15996) * FIX restore BaseNB._check_X without abstractmethod decoration (scikit-learn#15997) * Update v0.22 changelog for 0.22.1 (scikit-learn#16002) - set the date - move entry for quantile transformer to the 0.22.1 section - fix alphabetical ordering of modules * STY Removes hidden scroll bar (scikit-learn#15999) * Flake8 fixes * Fix: remove left-over lines that should have been deleted during conflict resolution when rebasing * Fix missing imports * Update version * Fix test_check_is_fitted * Make test_sag_regressor_computed_correctly deterministic (scikit-learn#16003) Fix scikit-learn#15818. Co-authored-by: cgsavard <claire.savard@colorado.edu> Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com> Co-authored-by: Matt Hall <matt@agilegeoscience.com> Co-authored-by: Kathryn Poole <kathryn.poole2@gmail.com> Co-authored-by: lucyleeow <jliu176@gmail.com> Co-authored-by: JJmistry <jayminm22@gmail.com> Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es> Co-authored-by: SylvainLan <sylvain.s.lannuzel@gmail.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com> Co-authored-by: Hanmin Qin <qinhanmin2005@sina.com> Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com> Co-authored-by: Vachan D A <vachanda@users.noreply.github.com> Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com> Co-authored-by: wenliwyan <12013376+wenliwyan@users.noreply.github.com> Co-authored-by: shivamgargsya <shivam.gargshya@gmail.com> Co-authored-by: Reshama Shaikh <rs2715@stern.nyu.edu> Co-authored-by: Oliver Urs Lenz <oulenz@users.noreply.github.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com> Co-authored-by: Brian Wignall <BrianWignall@gmail.com> Co-authored-by: Ritchie Ng <ritchieng@u.nus.edu> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: inderjeet <43402782+inder128@users.noreply.github.com> Co-authored-by: scibol <scibol@users.noreply.github.com> Co-authored-by: Tirth Patel <tirthasheshpatel@gmail.com> Co-authored-by: Bibhash Chandra Mitra <bibhashm220896@gmail.com> Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> Co-authored-by: Tiffany R. Williams <Tiffany8@users.noreply.github.com> Co-authored-by: Jigna Panchal <40188288+jigna-panchal@users.noreply.github.com> Co-authored-by: @nkish <19225359+ankishb@users.noreply.github.com> Co-authored-by: Pulkit Mehta <pulkit_mehta_work@yahoo.com> Co-authored-by: David Breuer <DavidBreuer@users.noreply.github.com> Co-authored-by: Niklas <niklas.sm+github@gmail.com> Co-authored-by: Windber <guolipengyeah@126.com> Co-authored-by: Stephen Blystone <29995339+blynotes@users.noreply.github.com> Co-authored-by: Brigitta Sipőcz <b.sipocz@gmail.com>
1 parent 68f165a commit 2e162b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+847
-698
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
echo "Skipping linting"
2929
exit 0
3030
else
31-
conda activate flake8_env
31 10000 +
source activate flake8_env
3232
./build_tools/circle/linting.sh
3333
fi
3434
displayName: Run linting

build_tools/azure/install.sh

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,9 @@ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
9797
make_conda "python=$PYTHON_VERSION"
9898
python -m pip install -U pip
9999
python -m pip install pytest==$PYTEST_VERSION pytest-cov pytest-xdist
100-
101-
# TODO: Remove pin when https://github.com/python-pillow/Pillow/issues/4518 gets fixed
102-
python -m pip install "pillow>=4.3.0,!=7.1.0,!=7.1.1"
103-
104-
python -m pip install pandas matplotlib pyamg scikit-image
100+
python -m pip install pandas matplotlib pyamg
105101
# do not install dependencies for lightgbm since it requires scikit-learn
106102
python -m pip install lightgbm --no-deps
107-
elif [[ "$DISTRIB" == "conda-pip-scipy-dev" ]]; then
108-
make_conda "python=$PYTHON_VERSION"
109-
python -m pip install -U pip
110-
python -m pip install pytest==$PYTEST_VERSION pytest-cov pytest-xdist
111-
echo "Installing numpy and scipy master wheels"
112-
dev_url=https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com
113-
pip install --pre --upgrade --timeout=60 -f $dev_url numpy scipy pandas cython
114-
echo "Installing joblib master"
115-
pip install https://github.com/joblib/joblib/archive/master.zip
116-
echo "Installing pillow master"
117-
pip install https://github.com/python-pillow/Pillow/archive/master.zip
118103
fi
119104

120105
if [[ "$COVERAGE" == "true" ]]; then

doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ def __call__(self, directory):
314314
},
315315
# avoid generating too many cross links
316316
'inspect_global_variables': False,
317-
'remove_config_comments': True,
318317
}
319318

320319

doc/developers/contributing.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ modifying code and submitting a PR:
264264
$ git add modified_files
265265
$ git commit
266266

267-
to record your changes in Git, then push the changes to your GitHub
268-
account with::
267+
$ git push -u origin my_feature
269268

270269
$ git push -u origin my_feature
271270

doc/developers/maintainer.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,10 @@ Making a release
114114
page.
115115

116116
2. On the branch for releasing, update the version number in
117-
`sklearn/__init__.py`, the ``__version__`` variable by removing ``dev*``
118-
only when ready to release. On master, increment the version in the same
119-
place (when branching for release). This means while we're in the release
120-
candidate period, the latest stable is two versions behind the master
121-
branch, instead of one.
117+
sklearn/__init__.py, the ``__version__`` variable by removing ``dev*`` only
118+
when ready to release.
119+
On master, increment the version in the same place (when branching for
120+
release).
122121

123122
3. At this point all relevant PRs should have been merged into the `0.99.X`
124123
branch. Create the source tarball:

doc/modules/multiclass.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ regression is also supported.
6262
binary classif F438 ication tasks, for example with
6363
:class:`sklearn.multioutput.MultiOutputClassifier`. This approach treats
6464
each label independently whereas multilabel classifiers *may* treat the
65-
multiple classes simultaneously, accounting for correlated behavior among
65+
multiple classes simultaneously, accounting for correlated behaviour amoung
6666
them.
6767

6868
For example, prediction of the topics relevant to a text document or video.
6969
The document or video may be about one of 'religion', 'politics', 'finance'
7070
or 'education', several of the topic classes or all of the topic classes.
7171

72-
A valid representation of :term:`multilabel` `y` is an either dense or sparse
72+
Valid representation of :term:`multilabel` `y` is either dense (or sparse)
7373
:term:`binary` matrix of shape ``(n_samples, n_classes)``. Each column
7474
represents a class. The ``1``'s in each row denote the positive classes a
7575
sample has been labelled with. An example of a dense matrix ``y`` for 3
@@ -99,10 +99,10 @@ regression is also supported.
9999

100100
For example, prediction of both wind speed and wind direction, in degrees,
101101
using data obtained at a certain location. Each sample would be data
102-
obtained at one location and both wind speed and direction would be
102+
obtained at one location and both wind speed and directtion would be
103103
output for each sample.
104104

105-
A valid representation of :term:`multioutput` `y` is a dense matrix of shape
105+
Valid representation of :term:`multilabel` `y` is dense matrix of shape
106106
``(n_samples, n_classes)`` of floats. A column wise concatenation of
107107
:term:`continuous` variables. An example of ``y`` for 3 samples:
108108

@@ -130,8 +130,8 @@ regression is also supported.
130130
image of a fruit, a label is output for both properties and each label is
131131
one of the possible classes of the corresponding property.
132132

133-
A valid representation of :term:`multioutput` `y` is a dense matrix of shape
134-
``(n_samples, n_classes)`` of class labels. A column wise concatenation of 1d
133+
Valid representation of :term:`multilabel` `y` is dense matrix of shape
134+
``(n_samples, n_classes)`` of floats. A column wise concatenation of 1d
135135
:term:`multiclass` variables. An example of ``y`` for 3 samples:
136136

137137
>>> y = np.array([['apple', 'green'], ['orange', 'orange'], ['pear', 'green']])
@@ -140,7 +140,7 @@ regression is also supported.
140140
['orange' 'orange']
141141
['pear' 'green']]
142142

143-
Note that all classifiers handling multioutput-multiclass (also known as
143+
Note that any classifiers handling multioutput-multiclass (also known as
144144
multitask classification) tasks, support the multilabel classification task
145145
as a special case. Multitask classification is similar to the multioutput
146146
classification task with different model formulations. For more information,

doc/modules/svm.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,10 @@ with and without weight correction.
277277

278278
:class:`SVC`, :class:`NuSVC`, :class:`SVR`, :class:`NuSVR`, :class:`LinearSVC`,
279279
:class:`LinearSVR` and :class:`OneClassSVM` implement also weights for
280-
individual samples in the `fit` method through the ``sample_weight`` parameter.
281-
Similar to ``class_weight``, this sets the parameter ``C`` for the i-th
282-
example to ``C * sample_weight[i]``, which will encourage the classifier to
283-
get these samples right. The figure below illustrates the effect of sample
284-
weighting on the decision boundary. The size of the circles is proportional
285-
to the sample weights:
280+
individual samples in method ``fit`` through keyword ``sample_weight``. Similar
281+
to ``class_weight``, these set the parameter ``C`` for the i-th example to
282+
``C * sample_weight[i]``.
283+
286284

287285
.. figure:: ../auto_examples/svm/images/sphx_glr_plot_weighted_samples_001.png
288286
:target: ../auto_examples/svm/plot_weighted_samples.html

doc/whats_new/v0.22.rst

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,6 @@
22

33
.. currentmodule:: sklearn
44

5-
.. _changes_0_22_2:
6-
7-
Version 0.22.2.post1
8-
====================
9-
10-
**March 3 2020**
11-
12-
The 0.22.2.post1 release includes a packaging fix for the source distribution
13-
but the content of the packages is otherwise identical to the content of the
14-
wheels with the 0.22.2 version (without the .post1 suffix). Both contain the
15-
following changes.
16-
17-
Changelog
18-
---------
19-
20-
:mod:`sklearn.impute`
21-
.....................
22-
23-
- |Efficiency| Reduce :func:`impute.KNNImputer` asymptotic memory usage by
24-
chunking pairwise distance computation.
25-
:pr:`16397` by `Joel Nothman`_.
26-
27-
:mod:`sklearn.metrics`
28-
......................
29-
30-
- |Fix| Fixed a bug in :func:`metrics.plot_roc_curve` where
31-
the name of the estimator was passed in the :class:`metrics.RocCurveDisplay`
32-
instead of the parameter `name`. It results in a different plot when calling
33-
:meth:`metrics.RocCurveDisplay.plot` for the subsequent times.
34-
:pr:`16500` by :user:`Guillaume Lemaitre <glemaitre>`.
35-
36-
- |Fix| Fixed a bug in :func:`metrics.plot_precision_recall_curve` where the
37-
name of the estimator was passed in the
38-
:class:`metrics.PrecisionRecallDisplay` instead of the parameter `name`. It
39-
results in a different plot when calling
40-
:meth:`metrics.PrecisionRecallDisplay.plot` for the subsequent times.
41-
:pr:`16505` by :user:`Guillaume Lemaitre <glemaitre>`.
42-
43-
:mod:`sklearn.neighbors`
44-
..............................
45-
46-
- |Fix| Fix a bug which converted a list of arrays into a 2-D object
47-
array instead of a 1-D array containing NumPy arrays. This bug
48-
was affecting :meth:`neighbors.NearestNeighbors.radius_neighbors`.
49-
:pr:`16076` by :user:`Guillaume Lemaitre <glemaitre>` and
50-
:user:`Alex Shacked <alexshacked>`.
51-
525
.. _changes_0_22_1:
536

547
Version 0.22.1
@@ -151,14 +104,6 @@ Changelog
151104
deprecated. This change is made to restore some backward compatibility with
152105
the behavior of this utility in version 0.21. :pr:`15947` by `Thomas Fan`_.
153106

154-
:mod:`sklearn.multioutput`
155-
..........................
156-
157-
- |Feature| :func:`multioutput.MultiOutputRegressor.fit` and
158-
:func:`multioutput.MultiOutputClassifier.fit` now can accept `fit_params`
159-
to pass to the `estimator.fit` method of each step. :issue:`15953`
160-
:pr:`15959` by :user:`Ke Huang <huangk10>`.
161-
162107
.. _changes_0_22:
163108

164109
Version 0.22.0

sklearn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
4040
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
4141
#
42-
__version__ = '0.22'
42+
__version__ = '0.22.1'
4343

4444

4545
# On OSX, we can get a runtime error due to multiple OpenMP libraries loaded

sklearn/cluster/_agglomerative.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from . import _hierarchical_fast as _hierarchical
2323
from ._feature_agglomeration import AgglomerationTransform
24+
from ..utils import deprecated
2425
from ..utils._fast_dict import IntFloatDict
2526
from ..utils.fixes import _astype_copy_false
2627

0 commit comments

Comments
 (0)
0