# Basic example
true = c(rep(1,5), rep(2,5), rep(3,5), rep(4,5))
pred = c(rep(1,4),4,rep(2,5),2,rep(3,4),1,rep(4,4))
df = cbind(true,pred)
BinaryClass(df)
true = c(rep(1,5), rep(2,5), rep(3,5), rep(4,5))
pred = c(rep(1,5),rep(2,5),rep(3,10))
df = cbind(true,pred)
BinaryClass(df)
# \donttest{
sd = SimData(k = c(10,40,50))
out = VIP(sd, v = 3, optimize = 'elbow', nstart = 5)
df = out$`BC Test`
BinaryClass(df)
## Looping through different clusters
sd = SimData(seed = 1, gene = 1)
acc = NULL
for (i in 1:5){
out = VIP(sd, v = i, optimize = 'off', nstart = 5)
acc[i] = BinaryClass(out$`BC Test`)$Accuracy
}
plot(acc, type = 'b', main = 'Accuracy Comparison', xlab = 'Clusters', ylab = 'Acc')
# }
Run the code above in your browser using DataLab