Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ddalphaf.getErrorRateCV

Test Functional DD-Classifier


Description

Performs a cross-validation procedure over the given data. On each step every numchunks observation is removed from the data, the functional DD-classifier is trained on these data and tested on the removed observations.

Usage

ddalphaf.getErrorRateCV (dataf, labels, numchunks = 10, disc.type = c("LS", "comp"),  ...)

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

numchunks

number of subsets of testing data. Equals to the number of times the classifier is trained.

disc.type

type of the used discretization scheme. "LS" for ddalphaf.train, "comp" for for compclassf.train

...

additional parameters passed to ddalphaf.train

Value

errors

the part of incorrectly classified data

time

the mean training time

time_sd

the standard deviation of training time

See Also

ddalphaf.train to train the functional DDα-classifier, ddalphaf.classify for classification using functional DDα-classifier, ddalphaf.test to test the functional DD-classifier on particular learning and testing data, ddalphaf.getErrorRatePart to perform a benchmark study of the functional DD-classifier on particular data.

Examples

# load the fdata
df = dataf.growth()

stat <- ddalphaf.getErrorRateCV(dataf = df$dataf, labels = df$labels, 
                                numchunks = 5,
                                adc.args = list(instance = "avr", 
                                                numFcn = 2, 
                                                numDer = 2))
                                                
cat("Classification error rate: ", stat$errors, ".\n", sep = "")

ddalpha

Depth-Based Classification and Calculation of Data Depth

v1.3.11
GPL-2
Authors
Oleksii Pokotylo [aut, cre], Pavlo Mozharovskyi [aut], Rainer Dyckerhoff [aut], Stanislav Nagy [aut]
Initial release
2020-01-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.