After we rank all the predictions from a model, we calculate AP_r from 0 to 1.0. Say, we make a limited amount of predictions but we locate all the ground truth provided by the labels. Then we should not have trouble calculating.
If we cannot locate all the ground truth, some of the p(r) with r close to 1.0 can be considered as 0. Even if we make an “unlimited” number of predictions, those p(r) will approach zero and treated that way also.