Learn R Programming

rSFA (version 1.5)

sfaStep: Update a step of the SFA algorithm.

Description

sfaStep() updates the current step of the SFA algorithm. Depending on sfaList$deg it calls either sfa1Step or sfa2Step to do the main work. See further documentation there

Usage

sfaStep(sfaList, arg, step = NULL, method = NULL)

Arguments

sfaList

A list that contains all information about the handled sfa-structure

arg

Input data, each column a different variable

step

Specifies the current SFA step. Must be given in the right sequence: for SFA1 objects: "preprocessing", "sfa" for SFA2 objects: "preprocessing", "expansion", "sfa" Each time a new step is invoked, the previous one is closed, which might take some time.

method

Method to be used: For sfaList$step="expansion" the choices are "TIMESERIES" or "CLASSIF". For sfaList$step="sfa" (sfa2Step only) the choices are "SVDSFA" (recommended) or "GENEIG" (unstable).

Value

list sfaList taken from the input, with new information added to this list. See sfa1Step or sfa2Step for details.

See Also

sfa1Step sfa2Step sfa1Create sfa2Create sfaExecute

Examples

Run this code
# NOT RUN {
   ## Suppose you have divided your training data into two chunks,
   ## DATA1 and DATA2. Let the number of input dimensions be N. To apply
   ## SFA on them write:
   
# }
# NOT RUN {
   sfaList = sfa2Create(N,xpDim(N))
   sfaList = sfaStep(sfaList, DATA1, "preprocessing")
   sfaList = sfaStep(sfaList, DATA2)
   sfaList = sfaStep(sfaList, DATA1, "expansion")
   sfaList = sfaStep(sfaList, DATA2)
   sfaList = sfaStep(sfaList, NULL, "sfa")
   output1 = sfaExecute(sfaList, DATA1)
   output2 = sfaExecute(sfaList, DATA2)
   
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab