Description Usage Arguments Value Examples
Wrapper function for model inputs to find_model
1 | model_trainer(.train, .predict, ...)
|
.train |
The training function. This function has to take a |
.predict |
The prediction function. This function needs to take two arguments, where the first is the model and the second the new dataset. |
... |
Other parameters to be passed to the training function. |
A list for use as a model input with find_model
1 2 3 4 5 6 | d <- data.frame(x = 1:10, y = 1:10 + rnorm(10, sd = .3))
model_trainer(
.train = function(data, ...) lm(data = data, formula = y ~ ., ...),
.predict = function(x,y) predict.lm(x,y),
x = FALSE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.