score {BRACoD.R} | R Documentation |
This calculate the precision, recall and F1 of your BRACoD results if you know the ground truth, ie. if this is simulated data.
score(taxon_identified, taxon_actual)
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 |
a list containing 1) the precision 2) the recall 3) the f1 metric
## 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)