penalizedLDA-package: Penalized linear discriminant analysis using lasso and fused...

Description Details Author(s) References Examples

Description

This package performs penalized linear discriminant analysis, intended for the high-dimensional setting in which the number of features p exceeds the number of observations n. Fisher's discriminant problem is modified in two ways: 1. A diagonal estimate of the within-class class covariance is used. 2. Lasso or fused lasso penalties are applied to the discriminant vectors in order to encourage sparsity, or sparsity and smoothness.

Details

Package: penalizedLDA
Type: Package
Version: 1.1
Date: 2015-07-09
License: GPL (>=2.0)
LazyLoad: yes

The main functions are PenalizedLDA, which performs penalized linear discriminant analysis, and PenalizedLDA.cv, which performs cross-validation in order to select the optimal tuning parameters for penalized LDA.

Author(s)

Daniela M. Witten

Maintainer: Daniela M. Witten <dwitten@u.washington.edu>

References

D Witten and R Tibshirani (2011) Penalized classification using Fisher's linear discriminant. To appear in Journal of the Royal Statistical Society, Series B.

Examples

1
2
3
4
5
6
7
8
9
set.seed(1)
n <- 20
p <- 100
x <- matrix(rnorm(n*p), ncol=p)
y <- c(rep(1,5),rep(2,5),rep(3,10))
x[y==1,1:10] <- x[y==1,1:10] + 2
x[y==2,11:20] <- x[y==2,11:20] - 2
out <- PenalizedLDA(x,y,lambda=.14,K=2)
print(out)

Example output

Number of discriminant vectors:  2
Number of nonzero features in discriminant vector  1 : 29
Number of nonzero features in discriminant vector  2 : 35
Total number of nonzero features:  45

Details:
Type:  standard
Lambda:  0.14

penalizedLDA documentation built on May 2, 2019, 8:36 a.m.