Disclosed are systems, methods, and non-transitory computer-readable storage media for predicting a future context of a computing device. In some implementations, a context daemon can use historical context information to predict future events and/or context changes. For example, the context daemon can analyze historical context information to predict user sleep patterns, user exercise patterns, and/or other user activity. In some implementations, a context client can register a callback for a predicted future context. For example, the context client can request to be notified ten minutes in advance of a predicted event and/or context change. The context daemon can use the prediction to notify a context client in advance of the predicted event.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method comprising: obtaining, by a computing device, a historical event stream corresponding to a context item monitored by the computing device; calculating, by the computing device, a plurality of probabilities that a particular value of the context item will be observed within a respective time periods in the historical event stream; generating, by the computing device, a probability curve based on the calculated probabilities; and predicting, by the computing device, a future occurrence of the particular value of the context item based on the probability curve. 2. The method of claim 1, further comprising: predicting a future occurrence of a user activity based on the probability curve. 3. The method of claim 2, wherein the predicted user activity corresponds to a predicted user sleep period. 4. The method of claim 2, further comprising: receiving, by a context daemon, a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time in advance of the predicted future occurrence of the user activity; scheduling, by the context daemon, transmission of the notification at the requested time; and sending, by the context daemon, the notification to the requesting client at the requested time in advance of the predicted future occurrence of the user activity. 5. The method of claim 2, further comprising: receiving, by a context daemon, a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time during the predicted user sleep period; scheduling, by the context daemon, transmission of the notification at the requested time during the predicted user sleep period; determining that the requested time corresponds to a current time; determining, by the context daemon, whether the user is asleep at the current time; and sending, by the context daemon, the notification to the requesting client when the context daemon determines that the user is asleep at the current time. 6. The method of claim 5, wherein determining whether the user is asleep at the current time comprises: determining whether a user initiated operation is being performed by the computing device at the current time. 7. The method of claim 5, wherein determining whether the user is asleep at the current time comprises: determining whether a user-visible operation is scheduled to be performed by the computing device within a threshold period of time relative to the current time. 8. A computing device for predicting future context comprising: a processor; and a memory storing executable instructions, which when executed by the processor, cause the processor to: obtain a historical event stream corresponding to a context item monitored by the computing device; calculate a plurality of probabilities that a particular value of the context item will be observed within a respective time periods in the historical event stream; generate a probability curve based on the calculated probabilities; and predict a future occurrence of the particular value of the context item based on the probability curve. 9. The computing device of claim 8, comprising further instructions, which when executed by the processor, cause the processor to: predict a future occurrence of a user activity based on the probability curve. 10. The computing device of claim 9, wherein the predicted user activity corresponds to a predicted user sleep period. 11. The computing device of claim 9, further comprising: a context daemon configured to: receive a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time in advance of the predicted future occurrence of the user activity; schedule transmission of the notification at the requested time; and send the notification to the requesting client at the requested time in advance of the predicted future occurrence of the user activity. 12. The computing device of claim 9, further comprising: a context daemon configured to: receive a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time during the predicted user sleep period; schedule transmission of the notification at the requested time during the predicted user sleep period; determine that the requested time corresponds to a current time; determine whether the user is asleep at the current time; and send the notification to the requesting client when the context daemon determines that the user is asleep at the current time. 13. The computing device of claim 12, wherein the determination of whether the user is asleep at the current time comprises the context daemon configured to: determine whether a user initiated operation is being performed by the computing device at the current time. 14. The computing device of claim 12, wherein the determination of whether the user is asleep at the current time comprises the context daemon configured to: determine whether a user-visible operation is scheduled to be performed by the computing device within a threshold period of time relative to the current time. 15. A non-transitory computer-readable medium containing instructions that, when executed by a computing device, cause the computing device to: obtain a historical event stream corresponding to a context item monitored by the computing device; calculate a plurality of probabilities that a particular value of the context item will be observed within a respective time periods in the historical event stream; generate a probability curve based on the calculated probabilities; and predict a future occurrence of the particular value of the context item based on the probability curve. 16. The non-transitory computer-readable medium of claim 15, comprising further instructions, which when executed by the computing device, cause the computing device to: predict a future occurrence of a user activity based on the probability curve. 17. The non-transitory computer-readable medium of claim 16, wherein the predicted user activity corresponds to a predicted user sleep period. 18. The non-transitory computer-readable medium of claim 16, comprising further instructions which when executed by the computing device, cause the computing device to: receive, at a context daemon, a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time in advance of the predicted future occurrence of the user activity; schedule transmission of the notification at the requested time; and send the notification to the requesting client at the requested time in advance of the predicted future occurrence of the user activity. 19. The non-transitory computer-readable medium of claim 16, comprising further instructions which when executed by the computing device, cause the computing device to: receive, at a context daemon, a callback request from a requesting client requesting that the context daemon notify the callback client at a requested time during the predicted user sleep period; schedule transmission of the notification at the requested time during the predicted user sleep period; determine that the requested time corresponds to a current time; determine whether the user is asleep at the current time; and send the notification to the requesting client when the context daemon determines that the user is asleep at the current time. 20. The non-transitory computer-readable medium of claim 19, wherein the determination of whether the user is asleep at the current time comprises the context daemon configured to: determine whether a user initiated operation is being performed by the computing device at the current time.