train_lr {creditmodel}R Documentation

Trainig LR model

Description

train_lr is for training the logistic regression model using in training_model.

Usage

train_lr(
  dat_train,
  dat_test = NULL,
  target,
  x_list = NULL,
  occur_time = NULL,
  prop = 0.7,
  tree_control = list(p = 0.02, cp = 1e-08, xval = 5, maxdepth = 10),
  bins_control = list(bins_num = 10, bins_pct = 0.05, b_chi = 0.02, b_odds = 0.1, b_psi
    = 0.03, b_or = 0.15, mono = 0.2, odds_psi = 0.15, kc = 1),
  thresholds = list(cor_p = 0.8, iv_i = 0.02, psi_i = 0.1, cos_i = 0.6),
  lasso = TRUE,
  step_wise = TRUE,
  best_lambda = "lambda.auc",
  seed = 1234,
  ...
)

Arguments

dat_train

data.frame of train data. Default is NULL.

dat_test

data.frame of test data. Default is NULL.

target

name of target variable.

x_list

names of independent variables. Default is NULL.

occur_time

The name of the variable that represents the time at which each observation takes place.Default is NULL.

prop

Percentage of train-data after the partition. Default: 0.7.

tree_control

the list of parameters to control cutting initial breaks by decision tree. See details at: get_tree_breaks

bins_control

the list of parameters to control merging initial breaks. See details at: select_best_breaks,select_best_class

thresholds

Thresholds for selecting variables.

  • cor_p The maximum threshold of correlation. Default: 0.8.

  • iv_i The minimum threshold of IV. 0.01 to 0.1 usually work. Default: 0.02

  • psi_i The maximum threshold of PSI. 0.1 to 0.3 usually work. Default: 0.1.

  • cos_i cos_similarity of posive rate of train and test. 0.7 to 0.9 usually work.Default: 0.5.

lasso

Logical, if TRUE, variables filtering by LASSO. Default is TRUE.

step_wise

Logical, stepwise method. Default is TRUE.

best_lambda

Metheds of best lanmbda stardards using to filter variables by LASSO. There are 3 methods: ("lambda.auc", "lambda.ks", "lambda.sim_sign") . Default is "lambda.auc".

seed

Random number seed. Default is 1234.

...

Other parameters


[Package creditmodel version 1.3.1 Index]