mul.dwd: Multi-way Distance Weighted Discrimination

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mul.dwd.r

Description

Optimizes the DWD objective for a multi-way dataset and a vector of class labels, under the assumption that the coefficient array is of low-rank.

Usage

1
mul.dwd(xmul,y,rank=1,C=100)

Arguments

xmul

An array of dimensions N x P x M. The initial dimension (N) gives the cases to be classified.

y

A vector of length N giving the class label ('-1' or '1') for each case.

rank

Assumed rank of the P x M coefficient matrix.

C

Penalty parameter for the DWD objective (adjusted by median pairwise distance)

Value

beta

P x M matrix of coefficients

int

Intercept

If r=1:

w

Vector of length P, giving weights in the second dimension

v

Vector of length M, giving weights in the third dimension

Author(s)

Eric F. Lock, Tianmeng Lyu, and Lynn E. Eberly

References

Hanwen, H., Lu, X., Liu, Y., Haaland, P., & Marron, J. S. (2012). R/DWD: distance-weighted discrimination for classification, visualization and batch adjustment. Bioinformatics, 28(8):1182-3.

See Also

kdwd

Examples

1
2
3
4
5
6
data(IFNB_Data) ##Load gene expression time course data (?IFNB_Data for more info)
results.mw <- mul.dwd(DataArray,y=Class, rank=1) #estimate rank 1 model
names(results.mw)
##Compute projection onto the classification direction for each individual:
DWD_scores <- c()
for(i in 1:length(Class)) DWD_scores[i] = sum(DataArray[i,,]*results.mw$beta)+results.mw$int

lockEF/MultiwayClassification documentation built on Dec. 17, 2020, 11:01 a.m.