Methods
Public methods
Benchmark$new()
create Benchmark
Usage
Benchmark\$new(
data,
toscale = c("p.value"),
fcestimate = "diff",
avgInt = "avgInt",
benchmark = list(list(score = "diff", desc = TRUE), list(score = "statistic", desc =
TRUE), list(score = "scaled.p.value", desc = TRUE)),
FDRvsFDP = list(list(score = "FDR", desc = FALSE)),
model_description = "protein level measurments, linear model",
model_name = "medpolish_lm",
contrast = "contrast",
species = "species",
hierarchy = c("protein_Id"),
summarizeNA = "statistic"
)
Arguments
-
data
-
data.frame
-
toscale
-
columns ot scale
-
fcestimate
-
column with fold change estimates
-
avgInt
-
average protein/peptide/metabolite intensity
-
benchmark
-
columns to benchmark
-
FDRvsFDP
-
score for which to generate FDR vs FDP
-
model_description
-
describe model
-
model_name
-
model name
-
contrast
-
contrast
-
species
-
species (todo rename)
-
hierarchy
-
e.g. protein_Id
-
summarizeNA
-
examine this column to determine the proportion of missing values default statistic
-
columns
-
to create FPR vs FDP analysis for
Benchmark$data()
get data
Usage
Returns
data.frame
Benchmark$missing_contrasts()
summarize missing contrasts
Usage
Benchmark\$missing_contrasts()
Returns
data.frame
Benchmark$complete()
set or get complete. If true only proteins for which all contrasts are determinable are examined.
Usage
Benchmark\$complete(value)
Arguments
-
value
-
TRUE if data should be complete (no missing contrasts)
Benchmark$.get_confusion()
get confusion data
Usage
Benchmark\$.get_confusion(arrange)
Arguments
Benchmark$get_confusion_benchmark()
get FDR summaries
Usage
Benchmark\$get_confusion_benchmark()
Benchmark$n_confusion_benchmark()
nr of elements used to determine ROC curve
Usage
Benchmark\$n_confusion_benchmark()
Benchmark$plot_ROC()
plot FDR summaries
Usage
Benchmark\$plot_ROC(xlim = 0.5)
Arguments
Returns
ggplot
Benchmark$pAUC_summaries()
AUC summaries
Usage
Benchmark\$pAUC_summaries()
Benchmark$pAUC()
AUC summaries as table
Usage
Benchmark$summary_metrics()
Summary metrics: geometric mean of per-contrast AUC/AP scores
Computes per-contrast metrics (excluding the pooled "all" row), then returns the geometric mean of each metric and arithmetic mean of n_total, one row per score.
Usage
Benchmark\$summary_metrics()
Returns
data.frame with columns: model_name, score, AUC, pAUC_10, pAUC_20, AP, pAP_50, pAP_80, n_total
Benchmark$get_confusion_FDRvsFDP()
FDR vs FDP data
Usage
Benchmark\$get_confusion_FDRvsFDP()
Benchmark$n_confusion_FDRvsFDP()
nr of elements used to determine ROC curve
Usage
Benchmark\$n_confusion_FDRvsFDP()
Benchmark$calibration_metrics()
FDR calibration metrics: measures how well the nominal FDR matches the actual false discovery proportion (FDP).
For each contrast and score, computes:
-
FDP_cal: mean absolute deviation mean(|FDP - FDR|) for FDR <= fdr_threshold (lower is better, 0 = perfect)
-
FDP_bias: mean signed deviation mean(FDP - FDR) (positive = anticonservative, negative = conservative)
Also returns an "average" row with arithmetic mean across contrasts.
Usage
Benchmark\$calibration_metrics(fdr_threshold = 0.2)
Arguments
-
fdr_threshold
-
maximum nominal FDR to evaluate (default 0.2)
Returns
data.frame with columns: model_name, contrast, score, FDP_cal, FDP_bias
Benchmark$plot_FDRvsFDP()
plot FDR vs FDP data
Usage
Benchmark\$plot_FDRvsFDP()
Returns
ggplot
Benchmark$plot_score_distribution()
plot distributions of scores
Usage
Benchmark\$plot_score_distribution(score)
Arguments
-
score
-
the distribution of which scores to plot (list)
Returns
ggplot
Benchmark$plot_scatter()
plot intensity vs scores
Usage
Benchmark\$plot_scatter(score)
Arguments
-
score
-
the distribution of which scores to plot (list)
Returns
ggplot
Benchmark$plot_precision_recall()
plot precision vs recall
Usage
Benchmark\$plot_precision_recall(precision_lim = 0.7, recall_lim = 1)
Arguments
-
precision_lim
-
limit shown precision from
-
recall_lim
-
limit shown recall to
Returns
ggplot
Benchmark$to_summary_table()
Export benchmark summary as a flat data.frame
Returns one row per contrast x score with AUC metrics and counts.
Usage
Benchmark\$to_summary_table(dataset = "unknown")
Arguments
-
dataset
-
dataset identifier string (default "unknown")
Returns
data.frame with columns: model_name, model_description, dataset, contrast, score, AUC, pAUC_10, pAUC_20, n_TP, n_TN, n_total, n_missing_contrasts
Benchmark$clone()
The objects of this class are cloneable with this method.
Usage
Benchmark\$clone(deep = FALSE)
Arguments
-
deep
-
Whether to make a deep clone.