Skip to content

Commit 9d39f57

Browse files
authored
Fixing NeighborhoodComponentAnalysis documentation. (scikit-learn#29441)
1 parent 21ab5e1 commit 9d39f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/neighbors/_nca.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ class NeighborhoodComponentsAnalysis(
5656
5757
- `'auto'`
5858
Depending on `n_components`, the most reasonable initialization
59-
will be chosen. If `n_components <= n_classes` we use `'lda'`, as
60-
it uses labels information. If not, but
59+
is chosen. If `n_components <= min(n_features, n_classes - 1)`
60+
we use `'lda'`, as it uses labels information. If not, but
6161
`n_components < min(n_features, n_samples)`, we use `'pca'`, as
6262
it projects data in meaningful directions (those of higher
6363
variance). Otherwise, we just use `'identity'`.

0 commit comments

Comments
 (0)