File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,9 @@ The `FeatureHasher` transformer operates on multiple columns. Each column may co
222222numeric or categorical features. Behavior and handling of column data types is as follows:
223223
224224- Numeric columns: For numeric features, the hash value of the column name is used to map the
225- feature value to its index in the feature vector. Numeric features are never treated as
226- categorical, even when they are integers. You must explicitly convert numeric columns containing
227- categorical features to strings first .
225+ feature value to its index in the feature vector. By default, numeric features are not treated
226+ as categorical ( even when they are integers). To treat them as categorical, specify the relevant
227+ columns using the ` categoricalCols ` parameter .
228228- String columns: For categorical features, the hash value of the string "column_name=value"
229229is used to map to the vector index, with an indicator value of ` 1.0 ` . Thus, categorical features
230230are "one-hot" encoded (similarly to using [ OneHotEncoder] ( ml-features.html#onehotencoder ) with
You can’t perform that action at this time.
0 commit comments