# NOT RUN {
#Classification with iris data set
rfprep <- rf_prep(x = iris[,1:4], y = iris$Species)
#View all three plots
Myrfplots <- rf_viz(rfprep, input = TRUE, imp = TRUE, cmd = TRUE, hl_color = 'orange')
#Select data on any of the plots then run:
iris[Myrfplots$input['selected'], ]
iris[Myrfplots$imp['selected'], ]
iris[Myrfplots$cmd['selected'], ]
#Rotate 3-D XYZ Scatterplot
#1. Click on 3-D XYZ Scatterplot
#2. Press 'r' on keyboard to enter rotation mode
#3. Click and drag mouse to rotate plot
#4. Press 'r' to leave rotation mode
#View only the Input Data and CMD Scaling Proximities Plots
Myrfplots <- rf_viz(rfprep, input = TRUE, imp = FALSE, cmd = TRUE, hl_color = 'orange')
#Regression with mtcars data set
rfprep2 <- rf_prep(x = mtcars[,-1], y = mtcars$mpg)
#View all three plots
Myrfplots <- rf_viz(rfprep2, input = TRUE, imp = TRUE, cmd = TRUE, hl_color = 'orange')
#Unsupervised clustering with iris data set
rfprep <- rf_prep(x = iris[,1:4], y = NULL)
#View the Input Data and CMD Scaling Proximities Plots for the unsupervised case.
#(Importance Scores Plot not valid here)
Myrfplots <- rf_viz(rfprep, input = TRUE, imp = FALSE, cmd = TRUE, hl_color = 'orange')
# }
Run the code above in your browser using DataLab