Learn R Programming

SQDA (version 1.0)

SQDA-package: Sparse Quadratic Discriminant Analysis

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.

Arguments

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.

References

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

Examples

Run this code
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

Run the code above in your browser using DataLab