We’ve been doing a lot of work on how people use our data to make decisions lately. Are there different ways that we can present weather data to the public which might be more immediately useful, and less obtrusive? In addition, we’ve been combining this Decision Recommendation Engine with a natural language interface which you can read about here.
As our first exercise, we’ve been considering this use case…
When should I go for a run?
We need to know certain things to give a recommendation of when you should go for a run. Probably at a minimum we want to know:
- your run path and duration: e.g. round my block, taking 15 minutes
- what time range you are interested in going for a run: e.g. in the next three days
- what kind of conditions you like to run in: e.g. temperature between 10°C and 25°C, preferably 15°C, and a probability of rain less than 30%, ideally 0%
- how you like to rate runs, base on your preferred conditions (more on this in a bit)
We could also start to consider such things as:
- when your calendar says you’re free
- how much you’ve enjoyed your previous runs - do you want to tweak your preferences?
DRE the Decision Recommendation Engine
By using this information, we can generate and rate different possible runs. To do this, our system has a few different concepts that we combine:
- An Action is something that you do at a particular time and place, that is, it’s instantaneous e.g. running at 11:37AM on 19/02/2016 at 50.7°N, 3.5°W
- An Activity is a collection of Actions: e.g. ten Actions like the one described above but with incrementally changing time and location, as you progress on your run. Note that, while all the Actions in an Activity are often the same, they needn’t be.
Actions can score themselves by comparing the users desired conditions to the the weather forecast at that time and location. The higher the score, the better that Action is. Activities can also score themselves by combining the scores of their Actions.
For the when type decision we’ve been talking about, we might generate a bunch of possible runs starting every 15 minutes. We then order them by their score to find our recommended run.
Zen and the Art of When to Run
Anyone who’s read Zen and the Art of Motorcycle Maintenance will know what a thorny concept quality can be: what makes something “better” than something else? There isn’t really a correct answer to this for what we’re talking about - ultimately its up to the user’s preferences - but here’s what we’ve settled on as a default method.
Each forecast value is compared to the user’s preferred conditions. If the forecast falls outside of the users limits, the score is 0, if it equals the ideal condition, the score is 1. For values in-between, the score changes gradually. (For the mathematically minded out there, it changes in a normal space rather than a linear one, to stop discontinuities at the transitions).
The score for an Action is the mean of the scores for the different forecast variables, and the score for an Activity is the mean of all the Action scores.
We’ve used our when decision as an example, but this is just the tip of the iceberg. We are extending this system to handle whats (Should I go for a run tonight, or go to the cinema?) and wheres (Where should I go for a picnic on Saturday?).
We are also really interested in how the user or the community of users can feedback into the preferred activity conditions e.g. “When should I go for a run? By the way, I was too cold last time”.