For example, it's common to fit an entire penalized regression path at a single time (i.e. glmnet).
The result is a fit method (glmnet::glmnet) that produces a coefficient path, which is a model family rather than a model. glmnet::cv.glmnet then does actual hyperparameter selection.
Since this interface is fairly commonplace, I'd like to think about alternatives and how to convince researchers to implement them. The fit.model and fit.model_family still make sense, but then there are some questions about, for example,
plot.path_model_family: does this plot coefficient regularization paths or a visual representation of hyperparameter search results?
coef.path_model_family does this return a full path of coefficients or coef(extract_model(object))?
And so on. In the case of coef a function argument could resolve this. For plot.path_model_family we may need to introduce a new generic plot_calibration_results, which might be a hard sell, or come up with a better solution (I'm opposed to a which argument to plot methods because nobody ever remembers what they do).
For example, it's common to fit an entire penalized regression path at a single time (i.e.
glmnet
).The result is a
fit
method (glmnet::glmnet
) that produces a coefficient path, which is a model family rather than a model.glmnet::cv.glmnet
then does actual hyperparameter selection.Since this interface is fairly commonplace, I'd like to think about alternatives and how to convince researchers to implement them. The
fit.model
andfit.model_family
still make sense, but then there are some questions about, for example,plot.path_model_family
: does this plot coefficient regularization paths or a visual representation of hyperparameter search results?coef.path_model_family
does this return a full path of coefficients orcoef(extract_model(object))
?And so on. In the case of
coef
a function argument could resolve this. Forplot.path_model_family
we may need to introduce a new genericplot_calibration_results
, which might be a hard sell, or come up with a better solution (I'm opposed to awhich
argument toplot
methods because nobody ever remembers what they do).I should ask Michael about this later.