Created
July 11, 2014 17:05
-
-
Save finbarrtimbers/e5360831997203531864 to your computer and use it in GitHub Desktop.
Box & Whiskers plot in R from a .csv file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("cvTools") | |
library('reshape2') | |
policy.all <- read.csv('data.csv', header = TRUE, sep = ',') | |
# > policy.all | |
# iteration RandomForest Lasso Ridge | |
# 1 1 0.18 0.06 0.06 | |
# 2 2 0.15 0.07 0.07 | |
# 3 3 0.15 -0.04 -0.06 | |
# 4 4 0.12 0.09 0.09 | |
# 5 5 0.20 0.03 0.03 | |
jpeg('bw-rfc.jpg') | |
policy.cv <- melt(policy.all[2:4]) | |
bwplot(variable ~ value, data = policy.cv, | |
xlab="Gini coefficient") | |
dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment