Sensitivity and Specificity for the patch prediction

Hello,

All the tests seem to work well until Sensitivity and Specificity for the patch prediction, which are slightly off.

As far as I can see my patch predictions look ok; I just want to check if anyone else has divergence at this point, which indicates something is going wrong earlier on in the notebook?

Or if a moderator can spot anything obvious I found implementing the sampling function quite challenging so may well have messed up there:

(given we implement random sampling I can’t quite see how the answer is always the same?)

Ok I can confirm that while it almost works, there is an error somewhere in the sampling volume code I wrote:

I’ll try to go back and fix it, but given it’s a pass I may let it… pass!