1. A computer-implemented method, comprising: computing, by a computing device, a first set of activity probabilities based on contextual information for a first set of historical activities and an activity-prediction model for a target activity, wherein an activity probability indicates a likelihood that the target activity has occurred; comparing a first set of probability thresholds with the first set of activity probabilities to determine a prediction success rate for each probability threshold; computing a utility score for each probability threshold based on the prediction success rates and a utility function; selecting a first probability threshold whose utility score is greater than or equal to a baseline utility score and other utility scores of the first set of thresholds; and assigning the first probability threshold to the activity-prediction model.