04pallav
9/13/2017 - 9:26 PM

Calculate means or std within different groups and plotting

Calculate means or std within different groups and plotting

summary.mtc1 <- data.frame(confusionmatrixgroup=levels(prediction$confusionmatrixgroup),mean_volume_mean=tapply(prediction$volume_mean, prediction$confusionmatrixgroup,mean))
summary.mtc1$mean_volume_mean=round(summary.mtc1$mean_volume_mean,digits=2)
ggplot(summary.mtc1, aes(x = confusionmatrixgroup, y = mean_volume_mean,fill=confusionmatrixgroup)) + geom_bar(stat = "identity")+
scale_fill_manual(values=c("purple", "blue", "darkgreen","red","yellow"))+
theme(text = element_text(size=24),axis.text.x = element_text(angle=0, vjust=1))+
geom_text(aes(y=mean_volume_mean, ymax=mean_volume_mean, label=mean_volume_mean),position= position_dodge(width=0.9), vjust=-.5,size=8)+
ggtitle('            Mean of Feature-volume_mean in different confusion matrix groups')