ms_bench_add_scores: adds FDR, TPR and FDP to data.

View source: R/Benchmark.R

ms_bench_add_scoresR Documentation

adds FDR, TPR and FDP to data.

Description

adds FDR, TPR and FDP to data.

Usage

ms_bench_add_scores(
  data,
  TP_col = "TP",
  arrangeby = "diff",
  desc = TRUE,
  subject_Id = "protein_Id"
)

Arguments

data

a dataframe with TP_col indicating if the row is a true positive hit

TP_col

column name of TP (TRUE, FALSE)

arrangeby

- by which column to sort.

desc

descending or ascending.

Value

data.frame with the following columns added FDP - false discovery proportion (Q in Benjamini Hochberg table) FPR - false positive rate TPR - true positive rate TP_hits - true positives

See Also

Other benchmarking: Benchmark, INTERNAL_FUNCTIONS_BY_FAMILY, ionstar_bench_preprocess(), make_benchmark(), ms_bench_auc()

Examples

dd <- prolfqua_data('data_test_confusion_matrix_scores')
xd <- ms_bench_add_scores(dd, arrangeby = "estimate")
plot(xd$TPR,xd$PREC, type="l")
plot(1- xd$PREC, xd$FDP)


wolski/prolfqua documentation built on Dec. 4, 2024, 11:18 p.m.