encodeSmoothFunctionOrder1: Encodes a smooth function into a sequence of states

Description Usage Arguments Details Value Author(s) Examples

View source: R/encodeSmoothFunctionOrder1.R

Description

Encodes a smooth function by its first derivatives. At each point on the abscissa the function is encoded into a binary variable. These points are represented as sequence of states

Usage

1
encodeSmoothFunctionOrder1(smoothFunc, abscissa)

Arguments

smoothFunc

A smooth function, already converted into an fda::fd object.

abscissa

A vector representing the x-axis or abscissa

Details

To use this function for a vector use the function createSmoothFD to convert to a fd object. For a smooth function f(x), the two possible states are as follows:

Value

A string of states representing the encoded form of the smooth function, example "AADDCCCB"

Author(s)

Subhrangshu Nandi, PhD Statistics; snandi@wisc.edu or nands31@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 data( growth, package = 'fda')
 Mat1 <- growth[['hgtm']]
 Arguments <- growth[['age']]
 Mean <- rowMeans( Mat1 )
MeanFD <- createSmoothFD(
    curvesToSmooth = Mean,
    abscissa       = Arguments,
    lambdas        = exp( -5:5 ),
    basisBreakFreq = 3,
    basisOrder     = 4,
    pbasis         = NULL )
 MeanStates <- encodeSmoothFunctionOrder1( smoothFunc = (MeanFD$curvesSmooth)$fd, abscissa = Arguments )

snandi/Registration documentation built on May 30, 2019, 5:04 a.m.