1. A method for inferring activities associated with a user, the method comprising: receiving a cluster of locations that indicates a location trace of the user during a period of time and corresponding context; smoothing the location trace, which involves statistically removing a first subset of locations from the location cluster, and interpolating a second subset of locations into the location cluster; deriving a set of venues based on the location cluster from a venue database, wherein a visit to a respective venue is identified as a hypothetical visit responsive to the venue being located within a location range which includes the received location cluster and being associated with the corresponding context; deriving a set of activity types associated with the venues from a venue-to-activity mapping; associating attributes of the venues to the activity types based on the corresponding context; identifying a subset of the activity types of which the associated attributes are similar to a query context; assigning a weight to each identified activity type based on similarity between its attributes and the query context; and producing a probability distribution of various activity types based on the subset of the activity types and their weights, wherein the probability distribution predicts likelihoods that the user engages in each identified activity type associated with the query context and the location.