% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/benchmark-loaders.R
\name{benchmark_run_classification}
\alias{benchmark_run_classification}
\title{Run a benchmark across one of the loaded pedon lists}
\usage{
benchmark_run_classification(
  pedons,
  system = c("wrb2022", "sibcs", "usda"),
  level = c("order", "subgroup", "subordem", "great_group", "suborder"),
  boot_n = 1000L
)
}
\arguments{
\item{pedons}{List of \code{\link{PedonRecord}} objects (output of
one of the \code{load_*} functions).}

\item{system}{One of \code{"wrb2022"}, \code{"sibcs"}, \code{"usda"}.}

\item{level}{Granularity of the comparison:
\itemize{
  \item \code{"order"} (default) -- the top-level RSG / Ordem /
        Order, compared against \code{cls$rsg_or_order};
  \item \code{"subgroup"} -- the full classified name (Subgroup
        in USDA, Subgrupo in SiBCS, RSG + qualifiers in WRB),
        compared against \code{cls$name} after case-insensitive
        token normalisation;
  \item \code{"subordem"} -- SiBCS-only, the 2nd-level
        "Ordem + Subordem" (e.g. "Latossolos Vermelhos").
        Comparison via the first two normalised tokens of the
        predicted name vs the reference;
  \item \code{"great_group"} (USDA, v0.9.24) -- the LAST token
        of the subgroup name (e.g. \code{"typic hapludalfs"} ->
        \code{"hapludalfs"}). Isolates whether the Great Group
        machinery is correct independent of subgroup modifiers
        (Typic / Aquic / Vertic / Cumulic / Pachic / etc.).
        Reads \code{site$reference_usda_grtgroup};
  \item \code{"suborder"} (USDA, v0.9.24) -- maps the Great
        Group prediction to its canonical Suborder suffix
        (\code{"hapludalfs"} -> \code{"udalfs"}) using the
        KST 13ed Ch 4 ~70-Suborder list. Reads
        \code{site$reference_usda_suborder}.
}}

\item{boot_n}{Bootstrap replicates for CI (default 1000).}
}
\value{
A list with elements \code{accuracy_top1},
        \code{accuracy_ci}, \code{confusion}, and
        \code{per_pedon} (one row per pedon with predicted vs
        reference).
}
\description{
Classifies each pedon in \code{pedons} against the named system,
compares against the published reference (e.g.
\code{site$reference_wrb}), and returns a confusion matrix +
top-1 / top-3 accuracy + bootstrap CI on top-1.
}
