sQDA: Spase Quadratic Discriminant Analysis

Description Usage Arguments Value References Examples

Description

Spase Quadratic Discriminant Analysis

Usage

1
2
sQDA(train.data = NULL, test.data = NULL, len = 100, lams = seq(0.02, 1,
  length = 10), presel = T, prelam = 0.2, margin = 0.05)

Arguments

train.data

data matrix with column names being the class labels and row names being the genes.

test.data

the new data needs to be predicted.

len

block size

lams

a sequence of lambda's from cross-validation.

presel

pre-selection indicator.

prelam

pre-selection sparisty parameter, only used when presel=T.

margin

error margin for pre-selection, only used when presel=T.

Value

returns a list object with following items.

pred

predictions for class labels on the test.data

p

the number of blocks selected

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.