R: Distance to the Trimmed Mean Classification Method
classDS
R Documentation
Distance to the Trimmed Mean Classification Method
Description
Implementation of the classification technique based on assigning each observation to the group that minimizes the distance of the observation to the trimmed mean of the group.
Usage
classDS(xl,yl,xt,alpha=0.2)
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
the proportion of observations that are trimmed out when computing the mean. 0.2 by default.
Details
This classification method proceeds by first computing the alpha trimmed mean corresponding to each group from the learning set, then computing the distance from a new observation to each trimmed mean. The new sample will then be assigned to the group that minimizes such distance. At the moment, only the Euclidean distance is implemented.
Value
pred
the vector of length m containing the predicted class of observations in matrix xt