Thanks Christoph!
Here is what I gather. Can you confirm it?
Definitions:
positives events = events identified by the algorithm
true events = events identified by an expert labeler
In your code here is how the fractions are calculated:
% TP = # of TP / # of positive events
% FP = # of FP / # of positive events
% FN = # of FN / # of true events
Is that accurate?