RF_test: RF_test

View source: R/RF_test.R

RF_testR Documentation

RF_test

Description

this function trains a random forest model with training data folds

Usage

RF_test(
  object = random_forest,
  newdata = testing_dataset,
  proximity_flag = TRUE
)

Arguments

proximity_flag

boolean; whether or not proximity should be calculated

random_forest

the resulting object from RF_train function

testing_dataset

the resulting object from simulate_data function

Examples

number_of_training_participants <- 10
number_of_testing_participants <- 10
covariance_matrix <- diag(2)
outcome_column <- 1
means <- c(0,0)
training_dataset <- simulate_data(number_of_training_participants,covariance_matrix,outcome_column,means)
mtry <- 1
nodesize <- 1
formula <- y~x
model_type <- rfsrc()
random_forest <- RF_Train(training_dataset,formula,mtry,nodesize,model_type)
testing_dataset <- simulate_data(number_of_testing_participants,covariance_matrix,outcome_column,means)
Optimal_RF_Parameters <- RF_Test(object=random_forest,newdata=testing_dataset,proximity=TRUE)

DCAN-Labs/RFRF documentation built on March 15, 2024, 2:33 p.m.