8000 DOC: Make the comment slightly clearer · scikit-learn/scikit-learn@72db6ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 72db6ae

Browse files
committed
DOC: Make the comment slightly clearer
1 parent d71c529 commit 72db6ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sklearn/preprocessing/data.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,9 +1061,10 @@ def _transform(self, X):
10611061
" Expected %d, got %d."
10621062
% (indices.shape[0] - 1, n_features))
10631063

1064-
# We mask those features of X are unknown, i.e less than n_values_
1065-
# If self.handle_unknown is "ignore", the row_indices and col_indices
1066-
# corresponding to the unknown categorical feature are masked.
1064+
# We use only those catgorical features of X that are known using fit.
1065+
# i.e lesser than n_values_ using mask.
1066+
# This means, if self.handle_unknown is "ignore", the row_indices and
1067+
# col_indices corresponding to the unknown categorical feature are ignored.
10671068
mask = (X < self.n_values_).ravel()
10681069
if np.any(~mask):
10691070
if self.handle_unknown not in ['error', 'ignore']:

0 commit comments

Comments
 (0)
0