discretize {rbooster} | R Documentation |
Discretize
Description
Discretizes numeric variables
Usage
discretize(xx, breaks = 3, boundaries = NULL, categories = NULL, w = NULL)
Arguments
xx |
matrix or data.frame whose variables needs to be discretized. |
breaks |
number of categories for each variable. Ignored if |
boundaries |
user-defined upper and lower limit matrix of discretization
for each variable. Default is |
categories |
user-defined category names for each variable. Default is |
w |
sample weights for quantile calculation. |
Details
Uses quantiles for discretization. However, quantiles may be equal in some cases. Then equal interval discretization used instead.
Value
a list consists of:
x_discrete |
data.frame of discretized variables. Each variable is a factor. |
boundaries |
upper and lower limit matrix of discretization for each variable. |
categories |
category names for each variable. |
Author(s)
Fatih Saglam, fatih.saglam@omu.edu.tr
[Package rbooster version 1.1.0 Index]