Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
98873ec
added classes_ ttribute in QuadraticDiscriminantAnalysis
Jul 15, 2019
11b84ab
added attributes following issue #14312
Jul 15, 2019
688d38e
Update sklearn/neighbors/classification.py
abhishek-jana Jul 20, 2019
ce4b591
Update sklearn/neighbors/classification.py
abhishek-jana Jul 20, 2019
c0f938e
Update classification.py
abhishek-jana Jul 20, 2019
2b7c9da
Update classification.py
abhishek-jana Jul 20, 2019
1b20c2c
Update classification.py
abhishek-jana Jul 20, 2019
d0bc530
Update classification.py
abhishek-jana Jul 20, 2019
900e606
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
4d61d48
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
bc20e44
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
6de7c39
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
0661940
Update classification.py
abhishek-jana Jul 21, 2019
d063b06
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
4f344c8
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
47364ce
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
7777fa0
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
24482b7
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
210f0ad
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
94b867f
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
8aaa22c
Update sklearn/neighbors/classification.py
abhishek-jana Jul 21, 2019
9dbdac2
Update sklearn/discriminant_analysis.py
abhishek-jana Jul 21, 2019
c9e600e
Update discriminant_analysis.py
abhishek-jana Jul 21, 2019
c7760aa
Update classification.py
abhishek-jana Jul 21, 2019
99990f5
Update discriminant_analysis.py
abhishek-jana Jul 21, 2019
c489597
Update discriminant_analysis.py
abhishek-jana Jul 21, 2019
86cb311
Update discriminant_analysis.py
abhishek-jana Jul 21, 2019
7b71d6c
Update classification.py
abhishek-jana Jul 21, 2019
b776c5b
Update classification.py
abhishek-jana Jul 21, 2019
f0cd531
STY Docstring spacing
thomasjpfan Jul 23, 2019
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
3 changes: 3 additions & 0 deletions sklearn/discriminant_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ class QuadraticDiscriminantAnalysis(BaseEstimator, ClassifierMixin):
of the Gaussian distributions along its principal axes, i.e. the
variance in the rotated coordinate system.

classes_ : array-like, shape (n_classes,)
Unique class labels.

Examples
--------
>>> from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis
Expand Down
40 changes: 40 additions & 0 deletions sklearn/neighbors/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,26 @@ class KNeighborsClassifier(NeighborsBase, KNeighborsMixin,
for more details.
Doesn't affect :meth:`fit` method.

Attributes
----------
classes_ : array of shape = (n_classes,)
Class labels known to the classifier

effective_metric_ : string or callble
The distance metric used. It will be same as the `metric` parameter
or a synonym of it, e.g. 'euclidean' if the `metric` parameter set to
'minkowski' and `p` parameter set to 2.

effective_metric_params_ : dict
Additional keyword arguments for the metric function. For most metrics
will be same with `metric_params` parameter, but may also contain the
`p` parameter value if the `effective_metric_` attribute is set to
'minkowski'.

outputs_2d_ : bool
False when `y`'s shape is (n_samples, ) or (n_samples, 1) during fit
otherwise True.

Examples
--------
>>> X = [[0], [1], [2], [3]]
Expand Down Expand Up @@ -296,6 +316,26 @@ class RadiusNeighborsClassifier(NeighborsBase, RadiusNeighborsMixin,
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.

Attributes
----------
classes_ : array of shape = (n_classes,)
Class labels known to the classifier.

effective_metric_ : string or callble
The distance metric used. It will be same as the `metric` parameter
or a synonym of it, e.g. 'euclidean' if the `metric` parameter set to
'minkowski' and `p` parameter set to 2.

effective_metric_params_ : dict
Additional keyword arguments for the metric function. For most metrics
will be same with `metric_params` parameter, but may also contain the
`p` parameter value if the `effective_metric_` attribute is set to
'minkowski'.

outputs_2d_ : bool
False when `y`'s shape is (n_samples, ) or (n_samples, 1) during fit
otherwise True.

Examples
--------
>>> X = [[0], [1], [2], [3]]
Expand Down