MGSDA-package {MGSDA}R Documentation

MGSDA: Multi-Group Sparse Discriminant Analysis

Description

Implements Multi-Group Sparse Discriminant Analysis proposal of I.Gaynanova, J.Booth and M.Wells (2015) "Simultaneous sparse estimation of canonical vectors in the p>>n setting", JASA, to appear.

Details

Package: MGSDA
Type: Package
Version: 1.4
Date: 2016-06-07
License: GPL(>=2)

Three functions for estimation and prediction: cv.dLDA, dLDA and classifyV.

Author(s)

Irina Gaynanova

Maintainer: Irina Gaynanova <irinag@stat.tamu.edu>

References

I.Gaynanova, J.Booth and M.Wells (2015). "Simultaneous sparse estimation of canonical vectors in the p>>N setting", JASA, to appear

Examples

### Example 1
# generate training data
n <- 10
p <- 100
G <- 3
ytrain <- rep(1:G,each=n)
set.seed(1)
xtrain <- matrix(rnorm(p*n*G),n*G,p)
# find matrix of canonical vectors V
V <- dLDA(xtrain,ytrain,lambda=0.1)
sum(rowSums(V)!=0)
# generate test data
m <- 20
set.seed(3)
xtest <- matrix(rnorm(p*m),m,p)
# perform classification
ytest <- classifyV(xtrain,ytrain,xtest,V)

[Package MGSDA version 1.4 Index]