# NOT RUN {
bf <- Butterfly(10000)
fly_select <- MBFR_parallel(bf, 5:25, ncores=2)
var_order <- fly_select[[2]]
var_perf <- fly_select[[3]]
dev.new(width=5, height=4)
plot(var_perf,type="b",pch=16,lwd=2,xaxt="n",xlab="",ylab="",
ylim=c(0,1),col="red",panel.first={grid(lwd=1.5)})
axis(1,1:length(var_order),labels=var_order)
mtext(1,text = "Added Features (from left to right)",line = 2.5,cex=1)
mtext(2,text = "Estimated Dissimilarity",line = 2.5,cex=1)
bf_large <- Butterfly(10^5)
system.time(MBFR(bf_large, 5:25))
system.time(MBFR_parallel(bf_large, 5:25))
# }
Run the code above in your browser using DataLab