Description Usage Arguments Value Author(s) Examples
This function wrap all the functions to get the raw risk factors speicified score, daymileage, discount coef. Before use this function, pleage make sure that your data and cofiguration are correct.
1 | cal_user_coef(df, risk_names, score_config_list, rf_weight, discount_index)
|
df |
Raw risk factors data.frame/tibble with the correct col names. |
risk_names |
Correct col names to calculate. |
score_config_list |
A List contains all riskFactors value and score index, read from .RDS file. |
rf_weight |
Correct col names of risk factors weight, sum to 1. |
discount_index |
Specified score and coef. |
a tibble
/ data.frame
1 2 3 4 5 6 7 8 9 | ## Not run:
cal_user_coef(pj_rf, "mielage", score_config_list, rf_weight, discount_index)
risk_names <- c("acc_count_phk","act_radius","dec_count_phk","high_curv_tr","holiday_tr",
"interstate_r","lane_change_phk","late_night_tr","long_tr","main_act_prov" ,
"mileage","speeding_lvl", "speeding_phk", "trip_dis_e", "turn_count_phk")
cal_user_coef(pj_rf, risk_names, score_config_list, rf_weight, discount_index)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.