ranking_percent_proc {creditmodel}R Documentation

Ranking Percent Process

Description

ranking_percent_proc is for processing ranking percent variables. ranking_percent_dict is for generating ranking percent dictionary.

Usage

ranking_percent_proc(
  dat,
  ex_cols = NULL,
  x_list = NULL,
  rank_dict = NULL,
  pct = 0.01,
  parallel = FALSE,
  note = FALSE,
  save_data = FALSE,
  file_name = NULL,
  dir_path = tempdir(),
  ...
)

ranking_percent_proc_x(dat, x, rank_dict = NULL, pct = 0.01)

ranking_percent_dict(
  dat,
  x_list = NULL,
  ex_cols = NULL,
  pct = 0.01,
  parallel = FALSE,
  save_data = FALSE,
  file_name = NULL,
  dir_path = tempdir(),
  ...
)

ranking_percent_dict_x(dat, x = NULL, pct = 0.01)

Arguments

dat

A data.frame.

ex_cols

Names of excluded variables. Regular expressions can also be used to match variable names. Default is NULL.

x_list

A list of x variables.

rank_dict

The dictionary of rank_percent generated by ranking_percent_dict .

pct

Percent of rank. Default is 0.01.

parallel

Logical, parallel computing. Default is FALSE.

note

Logical, outputs info. Default is TRUE.

save_data

Logical, save results in locally specified folder. Default is FALSE

file_name

The name for periodically saved rank_percent data file. Default is "dat_rank_percent".

dir_path

The path for periodically saved rank_percent data file Default is "tempdir()"

...

Additional parameters.

x

The name of an independent variable.

Value

Data.frame with new processed variables.

Examples

rank_dict = ranking_percent_dict(dat = UCICreditCard[1:1000,],
x_list = c("LIMIT_BAL","BILL_AMT2","PAY_AMT3"), ex_cols = NULL )
UCICreditCard_new = ranking_percent_proc(dat = UCICreditCard[1:1000,],
x_list = c("LIMIT_BAL", "BILL_AMT2", "PAY_AMT3"), rank_dict = rank_dict, parallel = FALSE)

[Package creditmodel version 1.3.1 Index]