File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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' ]:
You can’t perform that action at this time.
0 commit comments