compclassf.train {ddalpha}R Documentation

Functional Componentwise Classifier

Description

Trains the functional componentwise classifier

Usage

compclassf.train (dataf, labels, subset,
                  to.equalize = TRUE, 
                  to.reduce = TRUE, 
                  classifier.type = c("ddalpha", "maxdepth", "knnaff", "lda", "qda"), 
                  ...)

Arguments

dataf

list containing lists (functions) of two vectors of equal length, named "args" and "vals": arguments sorted in ascending order and corresponding them values respectively

labels

list of output labels of the functional observations

subset

an optional vector specifying a subset of observations to be used in training the classifier.

to.equalize

Adjust the data to have equal (the largest) argument interval.

to.reduce

If the data spans a subspace only, project on it (by PCA).

classifier.type

the classifier which is used on the transformed space. The default value is 'ddalpha'.

...

additional parameters, passed to the classifier, selected with parameter classifier.type.

Details

The finite-dimensional space is directly constructed from the observed values. Delaigle, Hall and Bathia (2012) consider (almost) all sets of discretization points that have a given cardinality.

The usual classifiers are then trained on the constructed finite-dimensional space.

Value

Trained functional componentwise classifier

References

Delaigle, A., Hall, P., and Bathia, N. (2012). Componentwise classification and clustering of functional data. Biometrika 99 299–313.

See Also

compclassf.classify for classification using functional componentwise classifier,

ddalphaf.train to train the functional DD-classifier,

dataf.* for functional data sets included in the package.

Examples


## Not run: 
## load the Growth dataset
dataf = dataf.growth()

learn = c(head(dataf$dataf, 49), tail(dataf$dataf, 34))
labels =c(head(dataf$labels, 49), tail(dataf$labels, 34)) 
test = tail(head(dataf$dataf, 59), 10)    # elements 50:59. 5 girls, 5 boys

c = compclassf.train (learn, labels, classifier.type = "ddalpha")

classified = compclassf.classify(c, test)

print(unlist(classified))


## End(Not run)

[Package ddalpha version 1.3.15 Index]