View source: R/componentCVPatterns.R
componentCVPatterns | R Documentation |
Performs pure cross-validation over specified patterns with mandatory fitters. This function evaluates different pattern fitting models using cross-validation to determine the best model for a given data subset.
componentCVPatterns(
df,
rows,
cols,
patternFunctions,
patternFitters,
preferenceOrder = names(patternFunctions),
nRepeats = 40,
testFraction = 0.2,
minCellsForModels = 25,
parsimonyMargin = 0.05,
requireFitters = TRUE,
verbose = FALSE
)
df |
A matrix or data frame containing the data |
rows |
Row indices to subset from df |
cols |
Column indices to subset from df |
patternFunctions |
A named list of pattern functions to evaluate |
patternFitters |
A named list of fitter functions corresponding to each pattern |
preferenceOrder |
Character vector specifying the preference order of patterns (default: names of patternFunctions) |
nRepeats |
Integer, number of cross-validation repeats (default: 40) |
testFraction |
Numeric, fraction of data to use for testing in each CV fold (default: 0.2) |
minCellsForModels |
Integer, minimum number of cells required for reliable CV (default: 25) |
parsimonyMargin |
Numeric, margin for parsimony selection as fraction (default: 0.05) |
requireFitters |
Logical, whether to require fitters for all patterns (default: TRUE) |
verbose |
Logical, whether to print progress messages (default: FALSE) |
A list containing:
decision |
Character, the selected best pattern name |
reason |
Character, explanation of the selection reasoning |
cv |
Data frame with CV summary statistics for each model |
repeats |
Data frame with detailed results from each CV repeat |
meta |
List with metadata about the CV procedure |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.