File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,10 @@ Since the hash function might cause collisions between (unrelated) features,
125
125
a signed hash function is used and the sign of the hash value
126
126
determines the sign of the value stored in the output matrix for a feature.
127
127
This way, collisions are likely to cancel out rather than accumulate error,
128
- and the expected mean of any output feature's value is zero.
129
-
130
- If ``non_negative=True `` is passed to the constructor, the absolute
131
- value is taken. This undoes some of the collision handling, but allows
132
- the output to be passed to estimators like
128
+ and the expected mean of any output feature's value is zero. This mechanism
129
+ is enabled by default with ``alternate_sign=True `` and is particularly useful
130
+ for small hash table sizes (``n_features < 10000 ``). For large hash table
131
+ sizes, it can be disabled to allow the output to be passed to estimators like
133
132
:class: `sklearn.naive_bayes.MultinomialNB ` or
134
133
:class: `sklearn.feature_selection.chi2 `
135
134
feature selectors that expect non-negative inputs.
You can’t perform that action at this time.
0 commit comments