plotUnsupervisedRF: Unsupervised random forest MDS plot

plotUnsupervisedRFR Documentation

Unsupervised random forest MDS plot

Description

A multidimensional scaling (MDS) plot of unsupervised random forest analysis

Usage

plotUnsupervisedRF(
  x,
  cls = "class",
  rf = list(),
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  seed = 1234,
  title = "",
  legendPosition = "bottom",
  labelSize = 2,
  ...
)

## S4 method for signature 'AnalysisData'
plotUnsupervisedRF(
  x,
  cls = "class",
  rf = list(),
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  seed = 1234,
  title = "",
  legendPosition = "bottom",
  labelSize = 2
)

## S4 method for signature 'Analysis'
plotUnsupervisedRF(
  x,
  cls = "class",
  rf = list(),
  label = NULL,
  shape = FALSE,
  ellipses = TRUE,
  seed = 1234,
  title = "",
  legendPosition = "bottom",
  labelSize = 2,
  type = c("pre-treated", "raw")
)

Arguments

x

object of class AnalysisData or Analysis

cls

sample information column to use for sample labelling

rf

list of additional parameters to pass to randomForest

label

info 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

seed

random number seed

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 is NULL

...

arguments to pass to the appropriate method

type

raw or pre-treated data to plot

Examples

library(metaboData)

d <- analysisData(abr1$neg[,200:300],abr1$fact)

## Unsupervised random forest MDS plot
plotUnsupervisedRF(d,cls = 'day')

jasenfinch/metabolyseR documentation built on Sept. 18, 2023, 1:25 a.m.