Plot multidimensional scaling plot for a RandomForest
class object.
Usage
plotMDS(
x,
cls = "class",
label = NULL,
shape = FALSE,
ellipses = TRUE,
title = "",
legendPosition = "bottom",
labelSize = 2
)
# S4 method for RandomForest
plotMDS(
x,
cls = "class",
label = NULL,
shape = FALSE,
ellipses = TRUE,
title = "",
legendPosition = "bottom",
labelSize = 2
)
# S4 method for list
plotMDS(
x,
label = NULL,
shape = FALSE,
ellipses = TRUE,
title = "",
legendPosition = "bottom",
labelSize = 2
)
Arguments
- x
S4 object of class
RandomForest
- cls
sample information column to use for sample labelling, Set to NULL for no labelling.
- label
sample information column to use for sample labels. Set to NULL for no labels.
- shape
TRUE/FALSE use shape aesthetic for plot points. Defaults to TRUE when the number of classes is greater than 12
- ellipses
TRUE/FALSE, plot multivariate normal distribution 95% confidence ellipses for each class
- title
plot title
- legendPosition
legend position to pass to legend.position argument of
ggplot2::theme
. Set to "none" to remove legend.- labelSize
label size. Ignored if
label
isNULL
Examples
library(metaboData)
x <- analysisData(abr1$neg[,200:300],abr1$fact) %>%
occupancyMaximum(cls = 'day') %>%
transformTICnorm()
rf <- randomForest(x,cls = 'day')
plotMDS(rf,cls = 'day')