Description Usage Arguments Value Examples
View source: R/viz_residuals.R
Residual plot of model
1 | viz_residuals(fit, new_data)
|
fit |
a parsnip model object |
new_data |
A data frame or matrix. |
a ggplot2 object
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(parsnip)
reg <- linear_reg() %>%
set_engine("lm") %>%
set_mode("regression") %>%
fit(mpg ~ ., data = mtcars)
viz_residuals(reg, mtcars)
linear_reg() %>%
set_engine("lm") %>%
set_mode("regression") %>%
fit(mpg ~ ., data = mtcars) %>%
viz_residuals(mtcars)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.