ggplot2

Class distribution plots for machine learning in R and ggplot2

During the feature selection phase of a machine learning classification project, it is often useful to visualize the class distributions to get a sense of what features separate the classes best and how a model might use each feature to make a separation.

I have experimented with many different ways of visualizing these densities in the R programming language using the ggplot2 library. Here I document a couple of approaches which I've found best aid this type of analysis.