Skip to content

Commit 1cd282d

Browse files
authored
DOC add n_features_in_ in the documentation (#20236)
1 parent 007da8d commit 1cd282d

Some content is hidden

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

81 files changed

+809
-73
lines changed

sklearn/cluster/_affinity_propagation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):
312312
n_features_in_ : int
313313
Number of features seen during :term:`fit`.
314314
315+
.. versionadded:: 0.24
316+
315317
Notes
316318
-----
317319
For an example, see :ref:`examples/cluster/plot_affinity_propagation.py

sklearn/cluster/_agglomerative.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,8 @@ class AgglomerativeClustering(ClusterMixin, BaseEstimator):
776776
n_features_in_ : int
777777
Number of features seen during :term:`fit`.
778778
779+
.. versionadded:: 0.24
780+
779781
children_ : array-like of shape (n_samples-1, 2)
780782
The children of each non-leaf node. Values less than `n_samples`
781783
correspond to leaves of the tree which are the original samples.
@@ -1045,6 +1047,8 @@ class FeatureAgglomeration(AgglomerativeClustering, AgglomerationTransform):
10451047
n_features_in_ : int
10461048
Number of features seen during :term:`fit`.
10471049
1050+
.. versionadded:: 0.24
1051+
10481052
children_ : array-like of shape (n_nodes-1, 2)
10491053
The children of each non-leaf node. Values less than `n_features`
10501054
correspond to leaves of the tree which are the original samples.

sklearn/cluster/_bicluster.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ class SpectralCoclustering(BaseSpectral):
261261
n_features_in_ : int
262262
Number of features seen during :term:`fit`.
263263
264+
.. versionadded:: 0.24
265+
264266
Examples
265267
--------
266268
>>> from sklearn.cluster import SpectralCoclustering
@@ -401,6 +403,8 @@ class SpectralBiclustering(BaseSpectral):
401403
n_features_in_ : int
402404
Number of features seen during :term:`fit`.
403405
406+
.. versionadded:: 0.24
407+
404408
Examples
405409
--------
406410
>>> from sklearn.cluster import SpectralBiclustering

sklearn/cluster/_birch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ class Birch(ClusterMixin, TransformerMixin, BaseEstimator):
404404
n_features_in_ : int
405405
Number of features seen during :term:`fit`.
406406
407+
.. versionadded:: 0.24
408+
407409
See Also
408410
--------
409411
MiniBatchKMeans : Alternative implementation that does incremental updates

sklearn/cluster/_dbscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ class DBSCAN(ClusterMixin, BaseEstimator):
220220
n_features_in_ : int
221221
Number of features seen during :term:`fit`.
222222
223+
.. versionadded:: 0.24
224+
223225
Examples
224226
--------
225227
>>> from sklearn.cluster import DBSCAN

sklearn/cluster/_kmeans.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ class KMeans(TransformerMixin, ClusterMixin, BaseEstimator):
769769
n_features_in_ : int
770770
Number of features seen during :term:`fit`.
771771
772+
.. versionadded:: 0.24
773+
772774
See Also
773775
--------
774776
MiniBatchKMeans : Alternative online implementation that does incremental
@@ -1471,6 +1473,8 @@ class MiniBatchKMeans(KMeans):
14711473
n_features_in_ : int
14721474
Number of features seen during :term:`fit`.
14731475
1476+
.. versionadded:: 0.24
1477+
14741478
See Also
14751479
--------
14761480
KMeans : The classic implementation of the clustering method based on the

sklearn/cluster/_mean_shift.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ class MeanShift(ClusterMixin, BaseEstimator):
314314
n_features_in_ : int
315315
Number of features seen during :term:`fit`.
316316
317+
.. versionadded:: 0.24
318+
317319
Examples
318320
--------
319321
>>> from sklearn.cluster import MeanShift

sklearn/cluster/_optics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ class OPTICS(ClusterMixin, BaseEstimator):
181181
n_features_in_ : int
182182
Number of features seen during :term:`fit`.
183183
184+
.. versionadded:: 0.24
185+
184186
See Also
185187
--------
186188
DBSCAN : A similar clustering for a specified neighborhood radius (eps).

sklearn/cluster/_spectral.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ class SpectralClustering(ClusterMixin, BaseEstimator):
421421
n_features_in_ : int
422422
Number of features seen during :term:`fit`.
423423
424+
.. versionadded:: 0.24
425+
424426
Examples
425427
--------
426428
>>> from sklearn.cluster import SpectralClustering

sklearn/covariance/_elliptic_envelope.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ class EllipticEnvelope(OutlierMixin, MinCovDet):
8383
Mahalanobis distances of the training set (on which :meth:`fit` is
8484
called) observations.
8585
86+
n_features_in_ : int
87+
Number of features seen during :term:`fit`.
88+
89+
.. versionadded:: 0.24
90+
8691
Examples
8792
--------
8893
>>> import numpy as np

0 commit comments

Comments
 (0)