PomaRandForest: Classification Random Forest for Mass Spectrometry Data

Description Usage Arguments Value Author(s) References Examples

View source: R/PomaRandForest.R

Description

PomaRandForest() allows users to perform a classification Random Forest with a MS data matrix using the classical randomForest R package.

Usage

1
2
3
4
5
6
7
8
PomaRandForest(
  data,
  ntest = 20,
  ntree = 500,
  mtry = floor(sqrt(ncol(t(MSnbase::exprs(data))))),
  nodesize = 1,
  nvar = 20
)

Arguments

data

A MSnSet object. First pData column must be the subject group/type.

ntest

Numeric indicating the percentage of observations that will be used as test set. Default is 20% of observations.

ntree

Number of trees to grow.

mtry

Number of variables randomly sampled as candidates at each split. This value is set sqrt(p) (where p is number of variables in data) by default.

nodesize

Minimum size of terminal nodes. By default is equal to 1.

nvar

Number of variables to show in the Gini plot.

Value

A list with all results for Random Forest including plots and data frames.

Author(s)

Pol Castellano-Escuder

References

A. Liaw and M. Wiener (2002). Classification and Regression by randomForest. R News 2(3), 18–22.

Examples

1
2
3
4
5
data("st000336")

st000336 %>% 
  PomaImpute() %>%
  PomaRandForest()

pcastellanoescuder/POMA documentation built on May 14, 2021, 11:07 p.m.