flEstimateDensity: Estimates a density on a given data vector.

Description Usage Arguments Value Examples

Description

This method calculates densities used by flowLearn. It uses the default stats::density function and smoothens the result using stats::spline.smooth.

Usage

1

Arguments

data

The data vector for which the density is calculated.

n

The number of density features.

Value

The calculated density object.

Examples

1
2
3
4
5
6
7
x <- seq(-pi, pi, by = 0.01)
y <- sin(x)
noise <- runif(n = length(y), min = 0, max = 1)
noisy_y <- y + noise
par(mfrow = c(2,1))
plot(noisy_y)
plot(flEstimateDensity(noisy_y, 512))

mlux86/flowLearn documentation built on May 29, 2019, 5:43 a.m.