tidymodels / tailor

Sandbox for a postprocessor object.
Other
2 stars 0 forks source link

`train` vs `fit` #20

Open simonpcouch opened 1 month ago

simonpcouch commented 1 month ago

The method to fit a tailor is called fit() and a new helper function calls that operation fitting:

https://github.com/tidymodels/tailor/blob/e98131d645cf4949cc97fa21e5fa13129e7fee02/R/utils.R#L76-L81

At the same time, some other functionality (printing, the slot $trained, the following helper) uses train:

https://github.com/tidymodels/tailor/blob/e98131d645cf4949cc97fa21e5fa13129e7fee02/R/utils.R#L64-L70

train follows the precedent of recipes::fully_trained(), print methods elsewhere, etc. I'm not sure if this might be a point of confusion for users.

topepo commented 1 month ago

I'm wondering if we should differentiate between "trained", "untrained", and "n/a". The last case is things like probability thresholding that don't estimate anything.

simonpcouch commented 1 month ago

The requires_fit slot can help us tell which operations don't estimate anything!