> Or would you cache the return of "fit" as well as "transform"?

Caching fit rather than transform. Fit is usually the costly step.

> Caching "fit" with joblib seems non-trivial.

Why? Caching a function that takes the estimator and X and y should do
it. The transformer would clone the estimator on fit, to avoid
side-effects that would trigger recomputes.

It's a pattern that I use often, I've just never coded a good transformer
for it.

On my usecases, it works very well, provided that everything is nicely
seeded. Also, the persistence across sessions is a real time saver.
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to