ramhiser / sparsediscrim

Sparse and Regularized Discriminant Analysis in R
Other
15 stars 5 forks source link

Plot of HDRDA tuning-parameter error grids #32

Closed ramhiser closed 8 years ago

ramhiser commented 8 years ago

Within hdrda_cv, a cv_summary is created with the cross-validation error rates for each tuning-parameter pair. Plot a heatmap or similar of the error rates.

ramhiser commented 8 years ago

A good model to follow is given here.

Although the code is for a different example, it's from the same author: ggplot2 heatmap code.

Example plot:

example heatmap

ramhiser commented 8 years ago

Not as good as the example above, so I'm gonna leave the ticket open, but a good start.

Example code:

library(sparsediscrim)

iris_x <- iris[, -5]
iris_y <- iris$Species

cv_out <- hdrda_cv(x=iris_x, y=iris_y, shrinkage_type = "convex")
plot(cv_out)

heatmap