showloadings: Loadings plot for heteroscedastic discriminant analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/hda.r

Description

Visualizes the loadings of the original variables on the components of the transformed discriminant space of reduced dimension.

Usage

1
showloadings(object, comps = 1:object$reduced.dimension, loadings = TRUE, ...)

Arguments

object

An object of class hda.

comps

A vector of component ids for which the loadings should be displayed.

loadings

Logical indicating whether loadings or variable importance lifts should be plotted.

...

Further arguments to be passed to the plot functions.

Details

Scatterplots of loadings (or lifts) of any variable on any hda component to give an idea of what variables do mainly contribute to the different discriminant components (see corresponding values of object). Note that as opposed to linear discriminant analysis not only location but also scale differences contribute to class discrimination of the hda components.

Value

No value is returned.

Author(s)

Gero Szepannek

References

Kumar, N. and Andreou, A. (1998): Heteroscedastic discriminant analysis and reduced rank HMMs for improved speech recognition. Speech Communication 25, pp.283-297.

Szepannek G., Harczos, T., Klefenz, F. and Weihs, C. (2009): Extending features for automatic speech recognition by means of auditory modelling. In: Proceedings of European Signal Processing Conference (EUSIPCO) 2009, Glasgow, pp.1235-1239.

See Also

hda, predict.hda, plot.hda

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(mvtnorm)
library(MASS)

# simulate data for two classes
n           <- 50
meana       <- meanb <- c(0,0,0,0,0)
cova        <- diag(5)
cova[1,1]   <- 0.2
for(i in 3:4){
  for(j in (i+1):5){
    cova[i,j] <- cova[j,i] <- 0.75^(j-i)}
  }
covb       <- cova
diag(covb)[1:2]  <- c(1,0.2)

xa      <- rmvnorm(n, meana, cova)
xb      <- rmvnorm(n, meanb, covb)
x       <- rbind(xa,xb)
classes <- as.factor(c(rep(1,n), rep(2,n)))
# rotate simulated data
symmat <- matrix(runif(5^2),5)
symmat <- symmat + t(symmat)
even   <- eigen(symmat)$vectors
rotatedspace <- x %*% even
plot(as.data.frame(rotatedspace), col = classes)

# apply heteroscedastic discriminant analysis and plot data in discriminant space
hda.res <- hda(rotatedspace, classes)

# visualize loadings
showloadings(hda.res)

Example output

Initialization by the identity.

newdim =  1 
Iteration 1 Log Likelihood:  -657.316904919881 
Iteration 2 Log Likelihood:  -569.717584801685 
Iteration 3 Log Likelihood:  -567.674665929001 
Iteration 4 Log Likelihood:  -567.674417003532 
Iteration 5 Log Likelihood:  -567.674416986676 
Iteration 6 Log Likelihood:  -567.674416986675 
Iteration 7 Log Likelihood:  -567.674416986675 

newdim =  2 
Iteration 1 Log Likelihood:  -653.459699043699 
Iteration 2 Log Likelihood:  -570.530801228884 
Iteration 3 Log Likelihood:  -566.67382670143 
Iteration 4 Log Likelihood:  -566.581490125836 
Iteration 5 Log Likelihood:  -566.566820206466 
Iteration 6 Log Likelihood:  -566.558959471287 
Iteration 7 Log Likelihood:  -566.553592107465 

newdim =  3 
Iteration 1 Log Likelihood:  -652.767161523633 
Iteration 2 Log Likelihood:  -559.275192008624 
Iteration 3 Log Likelihood:  -552.462309494103 
Iteration 4 Log Likelihood:  -552.334323687889 
Iteration 5 Log Likelihood:  -552.322604562116 
Iteration 6 Log Likelihood:  -552.318103832603 
Iteration 7 Log Likelihood:  -552.315777146665 

hda documentation built on May 2, 2019, 2:38 a.m.

Related to showloadings in hda...