viz.rf.opti: Visualization of random forest optimization

View source: R/viz.rf.opti.R

viz.rf.optiR Documentation

Visualization of random forest optimization

Description

Visualization of the results obtained via rf.opti.mtry.taxo. Plot the mean (+/- sd) sensitivity and mean (+/- sd) precision of each models obtained for each set of parameters and/or dataset

Usage

viz.rf.opti(
  foo,
  plot = TRUE,
  xlim = c(0, 1),
  ylim = c(0, 1),
  pch = c(22, 21, 24, 15, 16, 17),
  hue = c("#9a394e", "#d68157", "#f3d577", "#84b368", "#00876c"),
  axis.labels = c("Mean precision", "Mean sensitivity"),
  default.legend = TRUE,
  all_mtry = FALSE,
  display_tax = NULL,
  pdf.output = FALSE,
  filename = NULL,
  ...
)

Arguments

foo

The output of rf.opti.mtry.taxo, or alternatively, a vector of full names (including their path, usually obtained with list.files(pattern=".*RDS", full.names=T)) of RDS files containing outputs of the function rf.opti.mtry.taxo.

plot

Whether to plot the graph. Default is TRUE. If FALSE, only returns the features of the best prediction (see 'Value').

xlim

A vector of length two giving the range of the x-axis. Default is c(0,1).

ylim

A vector of length two giving the range of the y-axis. Default is c(0,1).

pch

A vector of the same length as foo containing pch for plotting. Default is c(22,21,24,15,16,17).

hue

A vector containing colors for each taxonomic levels. Default is a diverging color palette of length 5.

axis.labels

A a vector of length 2 containing x-axis and y-axis labels.

default.legend

Whether to display the default legend. Default = T.

all_mtry

Whether to plot the results from all mtry values. Default is TRUE. If FALSE, only the results for the best mtry parameters will be plotted.

display_tax

An optionnal vector of the names of the taxonomic levels to plot. Default = NULL plot all levels.

pdf.output

Whether to save the plot in a pdf file. Default = F.

filename

The file name and path where to save the pdf plot (only meaningful when pdf.output = T).

...

Other graphical parameters to pass to plot().

Value

Returns the features of the best prediction (i.e. giving the lowest mean error rate), including the corresponding file name and taxonomic level.


marccamb/optiranger documentation built on June 19, 2024, 9:18 a.m.