Skip to content
Quantoros

Why does HashingVectorizer not compute corpus-dependent IDF by itself?

Classic MLLevel: AdvancedIDF introduces state

Why does HashingVectorizer not compute corpus-dependent IDF by itself?

Hints
  • Hashing needs no corpus counts; IDF does.
  • Track state across the entire pipeline.

Answer

This answer is part of mentoring

Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.

Source and licence: scikit-learn 1.7.2 — feature extraction · BSD-3-Clause · answer: Quantoros editorial

Related questions