score {BRACoD.R}R Documentation

Score the results of BRACoD

Description

This calculate the precision, recall and F1 of your BRACoD results if you know the ground truth, ie. if this is simulated data.

Usage

score(taxon_identified, taxon_actual)

Arguments

taxon_identified

a list of integers corresponding to the indicies of the taxon you identified with BRACoD

taxon_actual

a list of integers corresponding to the indicies of the taxon that truely contribute to butyrate levels

Value

a list containing 1) the precision 2) the recall 3) the f1 metric

Examples

## Not run: 
df_summary <- summarize_trace(trace, colnames(sim_relab))
taxon_identified <- df_summary$taxon
taxon_actual <- which(contributions != 0)

r <- score(taxon_identified, taxon_actual)

precision <- r[[1]]
recall <- r[[2]]
f1 <- r[[3]]

print(sprintf("Precision: %.2f, Recall: %.2f, F1: %.2f",precision, recall, f1))

## End(Not run)

[Package BRACoD.R version 0.0.2.0 Index]