Skip to content
Quantoros

A search changes only the classifier. What can Pipeline(memory=...) reuse, and what does it not cache?

Classic MLLevel: IntermediateTransformer cache boundary

A search changes only the classifier. What can Pipeline(memory=...) reuse, and what does it not cache?

Hints
  • Cache keys include inputs and parameters.
  • The last step has a special rule.

Answer

It can reuse fitted intermediate transformations for identical data and parameters. The final step is never cached by Pipeline, and changed inputs or transformer parameters invalidate reuse.

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

Related questions