Description Usage Arguments Value Examples
Adds two columns to the original data of the scikit learn's linear regression model. This includes predictions and residuals.
1 | augment_lr(my_lr, x, y)
|
my_lr |
the linear model to augment |
x |
the data frame containing the explanatory variables |
y |
the data frame containing the target variable |
output data.frame
1 2 3 4 5 6 7 | # Import libraries
library(dplyr)
library(sptidy)
data("longley")
my_lr <- lm(Employed~., data = longley)
augment_lr(my_lr, (longley %>% select(!Employed)),
as.data.frame(longley$Employed))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.