SQDA-package: Sparse Quadratic Discriminant Analysis

Description Details Author(s) References Examples

Description

This package is used to perform Sparse Quadratic Discriminant Analysis (SQDA). In SQDA, the covariance matrix are assumed to be block-diagonal.And, for each block, sparsity assumption is imposed on the covariance matrix. It is useful in high-dimensional setting.

Details

Package: SQDA
Type: Package
Version: 1.0
Date: 2014-09-19
License: GPL-3

The package has one function, sQDA(), which basically takes in several parameters and output the predictions on the new dataset based on the sparse quadratic discriminant analysis. More details on the algorithms see the reference below.

Author(s)

Jiehuan Sun Jiehuan Sun <jiehuan.sun@yale.edu>

References

The application of sparse estimation of covariance matrix to quadratic discriminant analysis. Jiehuan Sun and Hongyu Zhao.

Examples

1
2
3
4
5
data(exampledata)
res<-sQDA(train.data[1:100,],test.data[1:100,],lams=0.2,presel=FALSE)
sum(res$pred!=colnames(test.data))/ncol(test.data)  ##prediction error
res$p ## number of blocks selected
res$pred ## predicted class labels on test.data

Example output

[1] 0
[1] 1
  [1] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
  [9] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
 [17] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
 [25] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
 [33] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
 [41] "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"    "IPF"   
 [49] "IPF"    "IPF"    "normal" "normal" "normal" "normal" "normal" "normal"
 [57] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
 [65] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
 [73] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
 [81] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
 [89] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
 [97] "normal" "normal" "normal" "normal"

SQDA documentation built on May 1, 2019, 7:29 p.m.