how_robust {rabi} | R Documentation |
Quick method to see how robust a list of ID codes is to erasures
Description
Given a list (or matrix) of generated numeric ID codes, this function does a crosswise comparison. It compares the 'Hamming distance' between every pair of given ID sequences, then returns a contingency table with the frequency of Hamming distances found. These Hamming distances represent how robust the coding scheme is to erasure errors. If a particular robustness to erasure is desired, there should be no distances equal to or lower than that robustness.
Usage
how_robust(codes)
Arguments
codes |
a list of numeric ID sequences generated by |
Value
a named, flattened list that contains a contingency table with the frequency of crosswise Hamming distances
Author(s)
Andrew Burchill, andrew.burchill@asu.edu
References
For information on Hamming distances.
For information on erasure coding.
Burchill, A. T., & Pavlic, T. P. (2019). Dude, where's my mark? Creating robust animal identification schemes informed by communication theory. Animal Behaviour, 154, 203-208. doi:10.1016/j.anbehav.2019.05.013
See Also
Examples
#Let's generate some unique IDs given:
total.length <- 4 #we have four positions to mark,
redundancy <- 2 #we're interested in being robust to two erasures,
alphabet <- 5 #and we currently have five types of color bands in stock
codes <- rs_IDs(total.length, redundancy, alphabet)
#Given that we specified a robustness of 2,
#there should be no counts of "dist.2" or lower
how_robust(codes)