  Diagnostic tests which can detect pre-clinical or sub-clinical infection, are
one of the most powerful tools in our armoury of weapons to control infectious
diseases. Considerable effort has been therefore paid to improving diagnostic
testing for human, plant and animal diseases, including strategies for
targeting the use of diagnostic tests towards individuals who are more likely
to be infected. Here, we follow other recent proposals to further refine this
concept, by using machine learning to assess the situational risk under which a
diagnostic test is applied to augment its interpretation . We develop this to
predict the occurrence of breakdowns of cattle herds due to bovine
tuberculosis, exploiting the availability of exceptionally detailed testing
records. We show that, without compromising test specificity, test sensitivity
can be improved so that the proportion of infected herds detected by the skin
test, improves by over 16 percentage points. While many risk factors are
associated with increased risk of becoming infected, of note are several
factors which suggest that, in some herds there is a higher risk of infection
going undetected, including effects that are correlated to the veterinary
practice conducting the test, and number of livestock moved off the herd.
