Learn R Programming

dprep (version 3.0.2)

disc.ew: Discretization using the equal width method

Description

Unsupervised discretization using intervals of equal width. The widths are computed using Scott's formula.

Usage

disc.ew(data, varcon,out=c("symb","num"))

Arguments

data
The name of the dataset containing the attributes to be discretized
varcon
A vector containing the indexes of the attributes to be discretized
out
To get the discretized dataset in a numerical format write "num". To get the discretized in an interval format write "symb"

Value

Returns a new data matrix with discretized values.

References

Venables, W.N., and Ripley, B.D. (2002). Modern Applied Statistics with S. Fourth edition, Springer

See Also

disc.ef, disc.1r,chiMerge,disc.mentr

Examples

Run this code
#----Discretization using the equal frequency method
data(bupa)
bupa.disc.ew=disc.ew(bupa,1:6,out="num")

Run the code above in your browser using DataLab