data(spikedApples)
apple.coef <- get.biom(X = spikedApples$dataMatrix,
Y = rep(1:2, each = 10),
fmethod = "vip",
ncomp = 3, type = "coef")
## ROC curve for all VIP values, ordered according to size
true.biom <- (1:ncol(spikedApples$dataMatrix) %in% spikedApples$biom)
vip.roc <- ROC(apple.coef$vip, true.biom)
plot(vip.roc)
## Add stability-based selection point
apple.stab <- get.biom(X = spikedApples$dataMatrix,
Y = rep(1:2, each = 10),
fmethod = "vip",
ncomp = 3, type = "stab")
stab.roc <- roc.value(apple.stab$vip[[1]]$biom.indices,
spikedApples$biom,
totalN = ncol(spikedApples$dataMatrix))
points(stab.roc, col = "red", pch = 19, cex = 1.5)
## Not run:
# ## Add HC-based selection point
# ## Attention: takes approx. 2 minutes on my PC
# apple.HC <- get.biom(X = spikedApples$dataMatrix,
# Y = rep(1:2, each = 10),
# fmethod = "vip",
# ncomp = 3, type = "HC")
# HC.roc <- roc.value(apple.HC$vip$biom.indices,
# spikedApples$biom,
# totalN = ncol(spikedApples$dataMatrix))
# points(HC.roc, col = "blue", pch = 19, cex = 1.5)
# ## End(Not run)
Run the code above in your browser using DataLab