You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does partial_fit mean for a transformer? Do we just re-fit_transform
with each new bit of training data? Or do we fit_transform the first time,
and transform the rest? I assume in most cases where this is useful, the
first bit of training data is adequate to fit the transformer, or else the
transformer has a null fit.
There may be benefit to saying "roll your own" and making the user think
about it, rather than implement arbitrary semantics.
What about if we provide a way to assign functions as the "fit" or "transform" functions in each step? Or would it be easier to just implement custom classes every time that would be necessary?
The pipeline supports two main functions (as well as reducing a small
amount of repeated code that one would have if they used a mere list):
to ensure correct use of transformers: only acquire sufficient statistics
from the training data, then apply to test
to apply in a cross-validation context, particularly with grid
search-assigned parameters (note that the pipeline is useful for this
application even when the transformer doesn't fit any model)
It is unclear how to apply online training to either of these ends, given
that scikit-learn doesn't directly support cross-validation, let alone grid
search, in an online setting. So yes, I think ad hoc implementation for
particular purposes might make sense unless one can identify substantial
regularity in usage patterns.
What about if we provide a way to assign functions as the "fit" or
"transform" functions in each step? Or would it be easier to just implement
custom classes every time that would be necessary?
—
Reply to this email directly or view it on GitHub #3299 (comment)
.
@miraculixx in your example, all the est.partial_fit calls are "embarrassingly parallel" or completely independent. Shouldn't there be some interdependence between partial_fit calls? i.e.,
@stsievert indeed yes, I noticed that in further testing and changed accordingly in my code base but unfortunately did not post here. Thanks for pointing this out. Updated above
Activity
jnothman commentedon Jun 19, 2014
What does partial_fit mean for a transformer? Do we just re-fit_transform
with each new bit of training data? Or do we fit_transform the first time,
and transform the rest? I assume in most cases where this is useful, the
first bit of training data is adequate to fit the transformer, or else the
transformer has a null fit.
There may be benefit to saying "roll your own" and making the user think
about it, rather than implement arbitrary semantics.
On 19 June 2014 11:12, Kenneth Lin [email protected] wrote:
linkenneth commentedon Jun 19, 2014
What about if we provide a way to assign functions as the "fit" or "transform" functions in each step? Or would it be easier to just implement custom classes every time that would be necessary?
jnothman commentedon Jun 19, 2014
The pipeline supports two main functions (as well as reducing a small
amount of repeated code that one would have if they used a mere list):
from the training data, then apply to test
search-assigned parameters (note that the pipeline is useful for this
application even when the transformer doesn't fit any model)
It is unclear how to apply online training to either of these ends, given
that scikit-learn doesn't directly support cross-validation, let alone grid
search, in an online setting. So yes, I think ad hoc implementation for
particular purposes might make sense unless one can identify substantial
regularity in usage patterns.
On 19 June 2014 11:46, Kenneth Lin [email protected] wrote:
linkenneth commentedon Jun 19, 2014
I see. Thanks a lot then! Marking as closed then
miraculixx commentedon Mar 17, 2018
Here's what worked for me:
jnothman commentedon Mar 18, 2018
That will work for some needs. It depends entirely on how your partially trained components fit together.
stsievert commentedon Jun 14, 2018
@miraculixx in your example, all the
est.partial_fitcalls are "embarrassingly parallel" or completely independent. Shouldn't there be some interdependence betweenpartial_fitcalls? i.e.,miraculixx commentedon Jun 16, 2018
@stsievert indeed yes, I noticed that in further testing and changed accordingly in my code base but unfortunately did not post here. Thanks for pointing this out. Updated above