% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EvaluateModel.R
\name{EvaluateRF}
\alias{EvaluateRF}
\title{Evaluate the Random Forest model}
\usage{
EvaluateRF(
  CrcBiomeScreenObject = NULL,
  outdir = tempdir(),
  TaskName = NULL,
  TrueLabel = NULL,
  PlotAUC = NULL
)
}
\arguments{
\item{CrcBiomeScreenObject}{A CrcBiomeScreenObject containing the model data and results}

\item{outdir}{The output directory where plots will be saved (default: tempdir()).}

\item{TaskName}{A character string used to label the output files and results.}

\item{TrueLabel}{The true label for the classification task, which is used to evaluate the model's performance.}

\item{PlotAUC}{A logical value indicating whether to plot the AUC curve. If TRUE, the AUC curve will be saved as a PDF file.}
}
\value{
A CrcBiomeScreenObject with the evaluation results stored in the \code{EvaluateResult$RF} slot.
}
\description{
Evaluate the Random Forest model
}
\examples{
# Minimal runnable example demonstrating input structure for EvaluateRF

# Toy training + test matrices
train_df <- data.frame(x = c(1, 2), TrainLabel = factor(c("control", "CRC")))
test_df  <- data.frame(x = c(3, 4))

# Build minimal CrcBiomeScreen object
obj <- new("CrcBiomeScreen",
  AbsoluteAbundance = data.frame(),
  RelativeAbundance = data.frame(),
  TaxaData = data.frame(),
  SampleData = data.frame(),
  ModelData = list(
    Training = train_df,
    Test = test_df,
    TrainLabel = train_df$TrainLabel,
    TestLabel = factor(c("control", "CRC"))
  ),
  ModelResult = list(
    RF = list(best.params = list(
      num.trees = 1, mtry = 1, node_size = 1, sample_size = 1
    ))
  )
)

# NOT RUN: real evaluation uses ranger + pROC (too slow for BioC builds)
# out <- EvaluateRF(obj, TaskName = "toy", TrueLabel = "CRC")

obj
}
