Comprehensive evaluation of cell type deconvolution predictions against ground truth fractions. Calculates multiple performance metrics including RMSE, MAE, MRE, Pearson correlation, and accuracy at different thresholds.
Usage
EvaluateDeconvolution(
predictions,
truth,
by_celltype = TRUE,
accuracy_thresholds = c(0.01, 0.05, 0.1)
)Arguments
- predictions
Data frame or matrix of predicted cell type fractions (samples x cell types).
- truth
Data frame or matrix of true cell type fractions (samples x cell types).
- by_celltype
Logical. Calculate metrics per cell type. Default is TRUE.
- accuracy_thresholds
Numeric vector. Thresholds for accuracy calculation. Default is c(0.01, 0.05, 0.1).
Value
A list containing:
- overall
Data frame with overall metrics (RMSE, MAE, MRE, correlation)
- by_celltype
Data frame with per-celltype metrics (if by_celltype = TRUE)
- accuracy
Data frame with accuracy at different thresholds
- sample_correlations
Numeric vector of per-sample correlations