get_accuracy: Calculate the accuracy of outbreak reconstruction

View source: R/get_accuracy.R

get_accuracyR Documentation

Calculate the accuracy of outbreak reconstruction

Description

Accuracy is defined as the proportion of correctly assigned ancestries across the posterior sample.

Usage

get_accuracy(out, true_tree)

Arguments

out

An object of class outbreaker_chains.

true_tree

A data frame with the true transmission tree, including 'from' and 'to' columns.

Value

A numeric vector of accuracy values for each posterior tree.

Examples

true_tree <- data.frame(from = as.character(outbreaker2::fake_outbreak$ances), to = linelist$id)
get_accuracy(out, true_tree)

o2ools documentation built on June 8, 2025, 10:18 a.m.