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

View source: R/discretization.plugin.R

discretize1d.uniform_frequencyR Documentation

Discretize a set of continuous data into 1-dimensional bins by uniform frequency

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

discretize1d.uniform_frequency(x)

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

# 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)

chupan1218/Informeasure documentation built on Jan. 19, 2024, 5:30 p.m.