Created
September 24, 2015 06:43
-
-
Save tobigithub/9a0925630fc830c1891d to your computer and use it in GitHub Desktop.
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
# caret plot functions | |
# http://machinelearningmastery.com/data-visualization-with-the-caret-r-package/ | |
library(caret) | |
# load the data | |
data(iris) | |
windows() | |
# pair-wise plots of all 4 attributes, dots colored by class | |
featurePlot(x=iris[,1:4], y=iris[,5], plot="pairs", auto.key=list(columns=3)) | |
windows() | |
# density plots for each attribute by class value | |
featurePlot(x=iris[,1:4], y=iris[,5], plot="density", scales=list(x=list(relation="free"), y=list(relation="free")), auto.key=list(columns=3)) | |
windows() | |
# box and whisker plots for each attribute by class value | |
featurePlot(x=iris[,1:4], y=iris[,5], plot="box", scales=list(x=list(relation="free"), y=list(relation="free")), auto.key=list(columns=3)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment