What sort of algorithm/solution could be used to indicate the similarity (overlap/precision/recall/...) of two sets of ranges.
I can think of (or find online) hundreds of similar problems but never exact, but surely this "wheel" must have been invented already...
Lets say that the input data is something like:
Real [ ## ### # ] or [(1,2),(4,6),(9,10)]
Predicted [ ## # ] or [(1,2),(4,4)]
Output should be ~50 %
Should I for example AND bitmaps, use interval trees or what? Is there a nice functional or simple to write algorithm? Any meaningful measure of similarity will do, and so will any reasonable input format.
Thank you.
(realistic length ~4000 with < 50 intervals in each set)