View source: R/trans_smoothing_inter.R
| smoothing_inter | R Documentation |
Discretize a numeric vector into n equal‑width intervals (robust bounds via boxplot whiskers)
and replace each value by the bin mean.
smoothing_inter(n)
n |
number of bins |
returns an object of class smoothing_inter
Han, J., Kamber, M., Pei, J. (2011). Data Mining: Concepts and Techniques. (Discretization)
data(iris)
obj <- smoothing_inter(n = 2)
obj <- fit(obj, iris$Sepal.Length)
sl.bi <- transform(obj, iris$Sepal.Length)
table(sl.bi)
obj$interval
entro <- evaluate(obj, as.factor(names(sl.bi)), iris$Species)
entro$entropy
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.