frosting layer that creates point and quantiles for any trainer #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are a couple of ways of going about this:
frosting
, determine whichlayer
s to insert; this requires the user to hand the trainer used when defining thefrosting
part of the workflow.pred
, and dispatch on that. to actually implement, this requires one ofslather.layer_quantile_distn
,slather.layer_point_from_distn
,slather.layer_predictive_distn
, andslather.layer_residual_quantiles
(I think this is a bad idea)slather.layer
functions (seems like it would be messy, and would involve faking having the correct objects in the workflow).slather.layer*
functions above so that the core doesn't depend on being in a workflow, and then reuse inside (this seems like probably the correct thing, but also fairly involved. Would definitely want to confirm if this is a good plan before potentially messing up the internals).At the moment, this just does 1; from a user's perspective, the difference isn't that great, so for now I'm doing the easy to implement one, and will come back to a different one based on feedback.
The current function signature is
The arguments are also... maybe a bit much, since they're the arguments of the 4 relevant functions jammed together. This does give the full range of flexibility of the original functions though, and I'm not sure there's a nicer way of guaranteeing that (suggestions welcome).
I'm a bit confused about the difference between
probs
andlevels
; it seems like they do the same thing, but have different default values? I put the two together to decrease the plethora of variables above.