View source: R/RF_optimal_test.R
RF_optimal_test | R Documentation |
this function tests the optimal random forest model from RF_optimal_train with testing data folds
RF_optimal_test(
object = optimal_random_forest,
newdata = testing_dataset,
proximity_flag = TRUE
)
proximity_flag |
boolean; whether or not proximity should be calculated |
optimal_random_forest |
the resulting object from RF_optimal_train function |
testing_dataset |
the heldout data from holdout function |
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)
proximity <- TRUE
Optimal_RF_Parameters <- RF_Test(object=random_forest,newdata=testing_dataset,proximity=proximity)
optimal_random_forest <- RF_optimal_train(data=training_dataset,formula=y~x,Optimal_RF_Parameters=NULL,model_type="rfsrc")
RF_prediction <- RF_optimal_test(object=optimal_random_forest,newdata=testing_dataset,proximity_flag=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.