R: Weighted Trimmed Mean Distance Classification Method
classTAD
R Documentation
Weighted Trimmed Mean Distance Classification Method
Description
Implementation of the classification technique based on assigning each observation to the group that minimizes the trimmed average distance of the given observation to the deepest points of each group in the learning set, weighted by the depth of these points in their own group.
Usage
classTAD(xl,yl,xt,alpha=0)
Arguments
xl
an nxp data matrix containing the observations (samples) from the learning set by rows and the variables (genes) by columns
yl
a vector of length n containing the class each observations in xl belongs to
xt
an mxp data matrix containing the observations (samples) from the test set by rows and the variables (genes) by columns
alpha
an optional value for the proportion of observations that are trimmed out when computing the mean. 0 by default.
Details
This method classifies a given observation x into one of g groups, of sizes n1,...,ng, but taking into account only the m=min{n1,...,ng} deepest elements of each group in the learning set. Additionally, this number can be reduced in a proportion alpha. The distance of x to these m elements is averaged and weighted with the depth of each element with respect to its own group.
Value
pred
the vector of length m containing the predicted class of observations in matrix xt