random_forest: random_forest Perform a classification or regression random...

View source: R/random_forest.R

random_forestR Documentation

random_forest Perform a classification or regression random forest model

Description

a wrapper built around the randomForest function from package randomForest. Returns a list with a randomForest object list, training data set, testing data set, metabolite metadata, and confusion matrices for training and testing data (if type was classification).

Usage

random_forest(
  count_data,
  metadata,
  model,
  training_proportion = c(80, 20),
  n_tree = 500
)

Arguments

count_data

Metabolomics data

metadata

sample data

model

a model of format variable ~.

training_proportion

a numeric vector of length 2, first element is the percent of samples to use for training the model, second element is the percent of samples used to test the models accuracy

n_tree

number of decision trees to create

Examples

rf_list <- random_forest(count_data = c57_nos2KO_mouse_countDF,metadata = c57_nos2KO_mouse_metadata,
model = Treatment ~.,training_proportion = c(60,40),n_tree = 500)

omu documentation built on Oct. 17, 2023, 1:06 a.m.