discretize.dens: discretize.dens

Description Usage Arguments Value Author(s) Examples

View source: R/adaptive_refinement_help.R

Description

density approximative discretization. Significant peaks in the density are determined and used as starting points for k-means based discretization. If only one peak is present, distribution quartiles are used for binning.

Usage

1
2
discretize.dens(data, graph=F, title="Density-approxmative Discretization",
rename.level=F, return.all=T, cluster=F, seed=NULL)

Arguments

data

a vector containing the data that may be discretized

graph

a boolean value, if TRUE, the density and the determined binning are plotted

title

a title for the plot

rename.level

a boolean value, if TRUE, factor levels are replaced by integers 1:n

return.all

a boolean value, if FALSE, only the discretized data are returned.

cluster

a boolean value, if data is a cluster variable and may already be discrete or not

seed

a random seed number

Value

discretized

the discretized data

levels

the factor levels

optima

the x and y coordinates of the determined peaks

Author(s)

Ann-Kristin Becker

Examples

1
2
3
testdata = c(rnorm(100,-3,1), rnorm(100,3,1))
d<-discretize.dens(testdata, graph=TRUE)
summary(d$discretized)

GroupBN documentation built on March 7, 2021, 5:06 p.m.