Learn R Programming

fpcb (version 0.1.0)

fdata_rkhs: functional data in rkhs

Description

Representing functinal data using Reproducing Kernel Hilbert Spaces. Approximate each curve with a smooth function using a kernel function.

Usage

fdata_rkhs(curves, rk, gamma = 1e-05)

Arguments

curves

a data matrix with observations (curves) in rows and the discretizations points in columns.

rk

kernek function rk object.

gamma

regularization parameter. Defaoult value = 1e-5.

Value

data

input curves.

fdata

smoothed curves.

lambda

coefficients of the (stable) and d dimensional RKHS representation.

alpha

coefficients of the RKHS expansion.

gamma

regularization parameter.

Details

With this function each function can be represented with a vector in R^d.

References

A. Mu<U+00F1>oz, J. Gonz<U+00E1>lez, Representing functional data using support vector machines, Pattern Recognition Letters 31 (2010) 511<U+2013>516. <doi:10.1016/j.patrec.2009.07.014>.

Examples

Run this code
# NOT RUN {
t = 1:50
curves = matrix(sin(t)+rnorm(length(t)),nrow=1)
f.data <- fdata_rkhs(curves, rk = rk(t,sigma = 0.01))
plot(t,curves, xlab='time', ylab='PM10 dataset', col='gray', lty=1, type='b')
lines(t,f.data$fdata, col='blue', lty=1)

# }

Run the code above in your browser using DataLab