View source: R/predict_multiflashlight.R
predict.multiflashlight | R Documentation |
Predict method for an object of class "multiflashlight".
Pass additional elements to update the flashlight, typically data
.
## S3 method for class 'multiflashlight'
predict(object, ...)
object |
An object of class "multiflashlight". |
... |
Arguments used to update the multiflashlight. |
A named list of prediction vectors.
fit_part <- lm(Sepal.Length ~ Petal.Length, data = iris)
fit_full <- lm(Sepal.Length ~ ., data = iris)
mod_full <- flashlight(model = fit_full, label = "full")
mod_part <- flashlight(model = fit_part, label = "part")
mods <- multiflashlight(list(mod_full, mod_part), data = iris, y = "Sepal.Length")
predict(mods, data = iris[1:5, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.