quantilecl.vw {quantileDA}R Documentation

A function to apply the quantile classifier that uses a different optimal quantile probability for each variable

Description

A function to apply the quantile classifier that uses a different optimal quantile probability for each variable

Usage

quantilecl.vw(train, test, cl, theta = NULL, cl.test = NULL)

Arguments

train

A matrix of data (the training set) with observations in rows and variables in columns. It can be a matrix or a dataframe.

test

A matrix of data (the test set) with observations in rows and variables in columns. It can be a matrix or a dataframe.

cl

A vector of class labels for each sample of the training set. It can be factor or numerical.

theta

Given $p$ variables, a vector of length $p$ of quantile probabilities (optional)

cl.test

If available, a vector of class labels for each sample of the test set (optional)

Details

quantilecl.vw carries out the quantile classifier by using a different optimal quantile probability for each variable selected in the training set.

Value

A list with components

Vseq

The value of the objective function at each iteration

thetas

The vector of quantile probabilities

me.train

Misclassification error for the best quantile probability in the training set

me.test

Misclassification error for the best quantile probability in the test set (only if cl.test is available)

cl.train

Predicted classification in the training set

cl.test

Predicted classification in the test set

lambda

The vector of estimated scale parameters

Author(s)

Marco Berrettini, Christian Hennig, Cinzia Viroli

See Also

See Also quantilecl

Examples

data(ais)
x=ais[,3:7]
cl=as.double(ais[,1])
set.seed(22)
index=sample(1:202,152,replace=FALSE)
train=x[index,]
test=x[-index,]
cl.train=cl[index]
cl.test=cl[-index]
out.q=quantilecl.vw(train,test,cl.train,cl.test=cl.test)
out.q$me.test

[Package quantileDA version 1.2 Index]