Skip to content

DOC Ensures that Binarizer passes numpydoc validation #20422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1a7f2fb
Update default doc string values
genvalen Jun 6, 2020
ca94a79
Update default docstrings for Metrics
genvalen Jun 7, 2020
cc09f9d
Fix lint error
genvalen Jun 7, 2020
a899bef
Merge remote-tracking branch 'upstream/master' into linear-model-defa…
genvalen Jun 7, 2020
c8cd424
Resolve merge conflicts
genvalen Jun 7, 2020
da935ac
Fix flake8 error
genvalen Jun 7, 2020
bede6d0
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
7b4647e
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
cfe8b2b
Update sklearn/metrics/_base.py
genvalen Jun 9, 2020
1ec16e8
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
5e52205
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
8df195e
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
c93effd
Update sklearn/metrics/pairwise.py
genvalen Jun 9, 2020
57ca202
Update sklearn/metrics/pairwise.py
genvalen Jun 9, 2020
3937592
Update sklearn/metrics/pairwise.py
genvalen Jun 9, 2020
a069d00
Update sklearn/metrics/pairwise.py
genvalen Jun 9, 2020
a82ee38
Update sklearn/metrics/pairwise.py
genvalen Jun 9, 2020
572ca85
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
89af371
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
601c757
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
4ed3830
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
1fa4425
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
48a5908
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
881f733
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
c85c836
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
9286fcb
Update sklearn/metrics/_classification.py
genvalen Jun 9, 2020
8367323
Update sklearn/metrics/_ranking.py
genvalen Jun 9, 2020
056c8e9
Update sklearn/metrics/_classification.py
genvalen Jun 10, 2020
036b8b6
Update sklearn/metrics/_classification.py
genvalen Jun 10, 2020
1a83796
Update sklearn/metrics/_classification.py
genvalen Jun 10, 2020
a3d0e1a
Update sklearn/metrics/_ranking.py
genvalen Jun 10, 2020
8573644
Update sklearn/metrics/_ranking.py
genvalen Jun 11, 2020
c291010
Update sklearn/metrics/_ranking.py
genvalen Jun 11, 2020
40dc8b0
Update sklearn/metrics/_ranking.py
genvalen Jun 12, 2020
769e6fb
Update sklearn/metrics/_ranking.py
genvalen Jun 12, 2020
0848721
Update sklearn/metrics/_regression.py
genvalen Jun 12, 2020
37963a2
Apply suggestions from code review
genvalen Jun 12, 2020
dc5cc39
Make edits
genvalen Jun 12, 2020
711658b
Make edits
genvalen Jun 12, 2020
808e240
Fix merge conflicts
genvalen Jun 11, 2021
0da8b25
Fix another merge conflict
genvalen Jun 11, 2021
abeeb66
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
genvalen Jun 12, 2021
12082a8
Merge remote-tracking branch 'upstream/main' into main
genvalen Jun 20, 2021
f592334
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
genvalen Jun 26, 2021
f45cc95
Remove bernouliNB from doc list
genvalen Jun 26, 2021
d146474
Fix some errors for BernoulliNB estimator
genvalen Jun 26, 2021
c9598ee
Fix error in BernoulliNB.fit funtion
genvalen Jun 26, 2021
4a8ac75
Fix error in BernoulliNB.partial_fit function.
genvalen Jun 27, 2021
cbe408c
Remove Binarizer from test_docstrings.py
genvalen Jun 29, 2021
bddda2d
Fix minor errors to ensure file passes numpydoc validation
genvalen Jun 29, 2021
9432c92
Add module to test_docstrings.py accidenatlly left out from previous …
genvalen Jun 29, 2021
e284086
Merge branch 'main' into Binarizer_numpydoc
ogrisel Jun 29, 2021
7bc4454
Fix merge conflict related problems
ogrisel Jun 29, 2021
f99a2cd
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
genvalen Jun 29, 2021
563dff7
Add KBinsDiscretizer and OneHotEncoder to see also section of Binarizer
genvalen Jun 29, 2021
4822f89
Merge branch 'Binarizer_numpydoc' of https://github.com/genvalen/scik…
genvalen Jun 29, 2021
ffe50a2
Remove double line break
genvalen Jun 29, 2021
f0bb46e
Update sklearn/naive_bayes.py
genvalen Jun 29, 2021
04ec3d2
Remove changes related to BernoulliNB
genvalen Jun 30, 2021
003b401
Undo changes related to BernoulliNB
genvalen Jun 30, 2021
a46d2ac
Remove changes related to BernoulliNB
genvalen Jun 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"BaggingRegressor",
"BernoulliNB",
"BernoulliRBM",
"Binarizer",
"Birch",
"CCA",
"CalibratedClassifierCV",
Expand Down
28 changes: 15 additions & 13 deletions sklearn/preprocessing/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ class Binarizer(TransformerMixin, BaseEstimator):
Threshold may not be less than 0 for operations on sparse matrices.

copy : bool, default=True
set to False to perform inplace binarization and avoid a copy (if
Set to False to perform inplace binarization and avoid a copy (if
the input is already a numpy array or a scipy.sparse CSR matrix).

Attributes
Expand All @@ -2016,6 +2016,20 @@ class Binarizer(TransformerMixin, BaseEstimator):

.. versionadded:: 0.24

See Also
--------
binarize : Equivalent function without the estimator API.
KBinsDiscretizer : Bin continuous data into intervals.
OneHotEncoder : Encode categorical features as a one-hot numeric array.

Notes
-----
If the input is a sparse matrix, only the non-zero values are subject
to update by the Binarizer class.

This estimator is stateless (besides constructor parameters), the
fit method does nothing but is useful when used in a pipeline.

Examples
--------
>>> from sklearn.preprocessing import Binarizer
Expand All @@ -2029,18 +2043,6 @@ class Binarizer(TransformerMixin, BaseEstimator):
array([[1., 0., 1.],
[1., 0., 0.],
[0., 1., 0.]])

Notes
-----
If the input is a sparse matrix, only the non-zero values are subject
to update by the Binarizer class.

This estimator is stateless (besides constructor parameters), the
fit method does nothing but is useful when used in a pipeline.

See Also
--------
binarize : Equivalent function without the estimator API.
"""

def __init__(self, *, threshold=0.0, copy=True):
Expand Down