| dataf | R Documentation |
fda.usc contains a handy function fdata that converts varios types of functional data to the fdata class.
To use these data in ddalphaf.train it must first be converted with dataf.
The function may be used either to convert a fdata object that contains multiple classes, or to convert multiple fdata objects, each of which contains one class.
Note that fdata$fdata2d = TRUE is not supported.
dataf(fdatas, labels)
fdatas |
an |
labels |
a list of labels of the functional observations.
If |
The functional data as a data structure (see dataf.*).
datafThe functional data as a list of objects. Each object is characterized by two coordinates
argsThe arguments vector
valsThe values vector
labelsThe classes of the objects
dataf.* for the functional data format.
ddalphaf.train to train the functional DD\alpha-classifier
compclassf.train to train the functional componentwise classifier
plot.functional for building plots of functional data
## Not run:
library(fda.usc)
data(phoneme)
# 1. convert a fdata object that contains multiple classes.
# labels are defined for each curve
converted = dataf(phoneme$learn, phoneme$classlearn)
plot.functional(converted)
# 2. convert multiple fdata objects, each of which contains one class
# the same label is applied to all curves of each fdata object
converted = dataf(list(phoneme$learn, phoneme$test), c("1 red", "2 blue"))
converted$name = "Phoneme learn (red) and test (blue)"
plot.functional(converted)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.