| model_save | R Documentation |
Saves already fitted insuRglm model for later use, which might be comparison using model_compare or
returning back to a previous model using model_revert.
model_save(setup, name = NULL)
setup |
Setup object. Created at the start of the workflow. Usually piped in from previous step. |
name |
Character scalar. Model will be saved under this name. |
Setup object with updated attributes.
model_compare, model_revert
require(dplyr) # for the pipe operator
data('sev_train')
setup <- setup(
data_train = sev_train,
target = 'sev',
weight = 'numclaims',
family = 'gamma',
keep_cols = c('pol_nbr', 'exposure', 'premium')
)
modeling <- setup %>%
factor_add(pol_yr) %>%
factor_add(agecat) %>%
model_fit() %>%
model_save('model1') %>%
factor_modify(agecat = variate(agecat, type = 'non_prop', mapping = c(1, 2, 3, 4, 5, 6))) %>%
model_fit()
modeling %>%
model_compare(with = 'model1')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.