skrub/minhash-odd-components-minmax
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| skrub | error | none, edit by hand | All versions |
MinHashEncoder computes min-hash and max-hash pairs when minmax_hash=True, so an odd n_components raises ValueError during fit.
enc = MinHashEncoder(n_components=31, minmax_hash=True)enc = MinHashEncoder(n_components=32, minmax_hash=True)What the rule reports
Section titled “What the rule reports”Calls to MinHashEncoder that pass minmax_hash=True with an odd integer literal for n_components.
How to fix it
Section titled “How to fix it”Pass an even integer for n_components when minmax_hash=True, or drop minmax_hash=True.
Diagnostic message
Section titled “Diagnostic message”MinHashEncoder with minmax_hash=True requires an even n_components and raises ValueError at fit time when n_components is odd. Pass an even integer or set minmax_hash=False.See all rules in the skrub pack.