Learn R Programming

creditmodel (version 1.0)

get_best_lambda: get_best_lambda plot_theme is for get Best lambda required in lasso_filter. This function required in lasso_filter

Description

get_best_lambda plot_theme is for get Best lambda required in lasso_filter. This function required in lasso_filter

Usage

get_best_lambda(lasso_model, lasso_model_cv, type.measure = "auc",
  sim_sign = "negtive")

Arguments

lasso_model

A lasso model genereted by glmnet.

lasso_model_cv

A cv lasso model genereted by cv.glmnet

type.measure

Default is "auc".

sim_sign

Default is "negtive". This is related to pos_plag. If pos_flag equals 1 or bad, the value must be set to negetive. If pos_flag equals 0 or good, the value must be set to positive.

Value

Four lanmbda values with different thresholds.

Details

lambda.min give a model with the best performance but the least number of independent variable. lambda.lse give the simplest model in the range of a standard deviation lambda.05se give the simplest model in the range of a half standard deviation lambda.sim_sign give the model with the same positive or negetive coefficients of all variables. lambda.sim_sign give the model with the same positive or negetive coefficients of all variables.