% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_cv_extract.R
\name{.extMeanCvFeat}
\alias{.extMeanCvFeat}
\title{Extract Cross-Validated OPLS Features}
\usage{
.extMeanCvFeat(cv_obj, feat = "t_xp")
}
\arguments{
\item{cv_obj}{Named list. Output of \code{.oplsComponentCv()} for a specific OPLS component.}

\item{feat}{Character. Feature name to extract from each CV fold object (e.g., \code{"t_xp"} or \code{"y_pred_test"}).}
}
\value{
A numeric matrix or array of the requested feature:
\itemize{
\item For Monte Carlo CV and single-column Y: matrix with rows \code{"mean"}, \code{"sd"}, and \code{"coverage"} x samples.
\item For Monte Carlo CV and multi-column Y: 3D array with shape \code{[3, samples, outcomes]}.
\item For k-fold CV: matrix or array containing values for each sample (no aggregation, just fold values).
}
}
\description{
Extracts a specific data structure (e.g., scores or predictions) from cross-validation output returned by \code{.oplsComponentCv()}.
Depending on the cross-validation type and model structure, the output is aggregated across folds by computing the mean,
standard deviation (SD), and coverage.

Here, \strong{Coverage} refers to the proportion of cross-validation folds in which a given sample's value was observed
(i.e., not missing), serving as an estimate of how frequently that value was evaluated across folds.
}
\keyword{internal}
