pipelearner icon indicating copy to clipboard operation
pipelearner copied to clipboard

Feature: wrapper functions to "predict" and "score"

Open drsimonj opened this issue 7 years ago • 0 comments

In general, a user will want to predict values and score/evaluated their fit after learning all models via learn(). The exact functions to do this are many. However, pipeable functions could be written that takes the tibble coming from learn() as well as a function that will take the relevant columns (e.g., test, target, and fit), and output the predicted values. It will then be the responsibility of the user to create a function that accepts these arguments.

e.g.,...

pl %>% learn() %>%
pl_predict("test_hat", FUN = function(test, target, fit) {
   # etc... to produce vectors of fitted values
}) %>%
pl_score("test_rsqr", FUN = function(test, target, test_hat) {
   # etc...
})

drsimonj avatar Apr 03 '17 04:04 drsimonj