Skip to content
Quantoros

Why is calling partialfit once per individual document not always efficient for naive Bayes?

Classic MLLevel: IntermediateIncremental batch sizing

Why is calling partial_fit once per individual document not always efficient for naive Bayes?

Hints
  • Calls have fixed costs besides arithmetic.
  • Streaming need not mean single-row updates.

Answer

Each call has overhead. Larger chunks within the memory budget amortize that overhead while retaining incremental learning; batch size is a throughput–memory trade-off.

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

Related questions