explore_corr | R Documentation |
Helps to explore associations (correlations between categorical variables) in the data or in the current (last) insuRglm model. It can be either through visual or tabular form. The metric used for strength of association is Cramer's V.
explore_corr(setup, type = c("visual", "tabular"))
setup |
Setup object. Created at the start of the workflow. Usually piped in from previous step. |
type |
Character scalar. Either |
Either a dataframe or a ggplot2 chart.
explore_data
, explore_target
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') ) explore_corr(setup, type = 'visual') explore_corr(setup, type = 'tabular') modeling <- setup %>% factor_add(pol_yr) %>% factor_add(agecat) %>% factor_add(veh_age) %>% factor_add(veh_value) %>% model_fit() explore_corr(modeling, type = 'visual') explore_corr(modeling, type = 'tabular')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.