alexpghayes / modelling-in-r

an initial attempt to describe a grammar of modelling for r
https://alexpghayes.github.io/modelling-in-r/
3 stars 0 forks source link

Modelling techniques with default hyperparameter spaces (e.x. path algorithms) #13

Open alexpghayes opened 6 years ago

alexpghayes commented 6 years ago

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,

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).

I should ask Michael about this later.