calcConfusionCv: Calculate confusion matrix for cross-validation.

View source: R/metapredict_confusion.R

calcConfusionCvR Documentation

Calculate confusion matrix for cross-validation.

Description

Calculate a confusion matrix based on predictions from cross-validation.

Usage

calcConfusionCv(
  cvFit,
  lambda,
  ematMerged,
  sampleMetadata,
  className = "class",
  classLevels = NA
)

Arguments

cvFit

cv.glmnet object from metapredictCv().

lambda

value of lambda at which to use predictions.

ematMerged

matrix of gene expression for genes by samples.

sampleMetadata

data.frame of sample metadata.

className

name of column in sampleMetadata containing the true labels.

classLevels

Order of classes in the confusion matrix. If NA (default), then the function uses the order in cvFit.

Value

An object of class table.


jakejh/metapredict documentation built on Feb. 14, 2023, 7:53 p.m.