I am building a machine learning system which predicts the location of tweets as a bounding box (using the google maps API among other things). Since the twitter API also supplies a bounding box, I am trying to calculate the distance between my predicted box and the actual one.

Up to now, I have just been calculating the center of each box and using the distance between them as my measure, but this method is problematic because the regions can overlap partially or be contained within each other, etc. Is there a better way to determine the difference between the two regions?

The only idea I've had so far is to measure the overlap as a percent of each box's area and then maybe use that as a weight somehow, but GIS is not my field, so I know very little about any existing techniques.

My other idea was to model this as more of a geometry problem by just looking at this as the average distance between two random points selected respectively from each region. This obviously doesn't take into account the population differences between (and inside of) the regions, but for small regions this would be valid. This method would eliminate the problem of potentially overlapping regions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.