MGSDA-package: MGSDA: Multi-Group Sparse Discriminant Analysis

Description Details Author(s) References Examples

Description

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

Details

Package: MGSDA
Type: Package
Version: 1.5
Date: 2021-01-25
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 (2016). "Simultaneous sparse estimation of canonical vectors in the p>>N setting", JASA, 111(514), 696-706.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
### 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)

irinagain/MGSDApackage documentation built on March 11, 2021, 12:26 a.m.