8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71c529 commit 72db6aeCopy full SHA for 72db6ae
sklearn/preprocessing/data.py
@@ -1061,9 +1061,10 @@ def _transform(self, X):
1061
" Expected %d, got %d."
1062
% (indices.shape[0] - 1, n_features))
1063
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.
+ # We use only those catgorical features of X that are known using fit.
+ # i.e lesser than n_values_ using mask.
+ # This means, if self.handle_unknown is "ignore", the row_indices and
1067
+ # col_indices corresponding to the unknown categorical feature are ignored.
1068
mask = (X < self.n_values_).ravel()
1069
if np.any(~mask):
1070
if self.handle_unknown not in ['error', 'ignore']:
0 commit comments