aplica_cortes_ordinales: aplica_cortes_ordinales

Description Usage Arguments Examples

View source: R/aplica_cortes_ordinales.R

Description

apply the cuts obtained with aplica_agrupa_nominal to a list of new variables .

Usage

1
aplica_cortes_ordinales(tbla_cortes_variables_ord, tbl, campo_merge)

Arguments

tbla_cortes_variables_ord

table with cuts return by aplica_agrupa_nominal.

tbl

table with data to apply the cuts.

campo_merge

name of the variable used to merge the result and the data (index).

Examples

1
2
3
4
5
6
7
tbla<-data.frame(
id=1:100,
grupo1=rep(1:5,100/5),
valor=c( as.numeric(rep(runif(90), 1)>.5) , rep(0, 5), rep(1, 5)) ,
grupo2=rep(c(11,22,33,33,33),100/5))
tbl_grupos=aplica_agrupa_ordinal(train_tbl=tbla, num_cols=c('grupo1', 'grupo2'), target_name='valor', num_ini_groups=100, limite=0.05)
aplica_cortes_ordinales(tbla_cortes_variables_ord=tbl_grupos, tbl=tbla, campo_merge='id')

GabyP/preparation4modeling documentation built on Sept. 24, 2020, 11:57 p.m.