discretize1d.uniform_frequency: Discretize a set of continuous data into 1-dimensional bins...

Description Usage Arguments Details Value Examples

View source: R/discretization.plugin.R

Description

discretize1d.uniform_frequency assigns the observations of a continuous random variables to bins according to the "uniform frequency" method, and returns a corresponding count table.

Usage

1

Arguments

x

a numeric vector of a random variable.

Details

Uniform frequency-based method ("uniform_frequency") divides the continuous data into N bins with (approximate) equal count number. The number of bins N is initialized into a round-off value according to the square root of the data size.

Value

discretize1d.uniform_frequency returns a one-dimensional count table.

Examples

1
2
3
4
5
# a numeric vector corresponding to a continuous random variable
x <- c(0.0, 0.2, 0.2, 0.7, 0.9, 0.9, 0.9, 0.9, 1.0)

# corresponding count table estimated by "uniform frequency" algorithm
discretize1d.uniform_frequency(x)

Example output

1 2 3 
3 3 3 

Informeasure documentation built on Nov. 8, 2020, 7:20 p.m.