This article was first published in 2021 and has been updated.
We’re excited to cheer on the riders of Team Jumbo-Visma as they fight their way to the finish line. At Visma, we’ve taken our role as sponsors one step further by going behind the scenes to help our team perform their best during races.
Creating technology that solves complex issues is what we do best. And, whether it’s climbing the steepest hill or developing an advanced algorithm, teamwork is essential. So it was a natural step for us to team up with Team Jumbo-Visma to see how we could work together to optimise their performance.
In this video, Martijn Redegeld, Performance Nutritionist for Team Jumbo-Visma, talks about how Visma optimises calorie prediction using AI. Take a look:
Fueling up to the finish line
In the past, coaches would start preparing their calorie estimates more than three weeks in advance to make sure they had adequate assessments per cyclist, per stage. Using information like the stage’s profile, cyclists’ body-mass index, elevation, and total distance, they would manually arrive at their calculations.
But out on the track, unforeseen factors almost always impact how much energy the cyclists use. The weather, for instance, can cause cyclists to exert themselves more, or perhaps the team’s tactics need to change due to other circumstances.
This means coaches would often have to review their estimates before each stage of the race. Needless to say, this was a very time-consuming exercise. So, we decided to see how we could simplify the lives of both coaches and cyclists. Working together with the team, we embarked on a journey to improve the nutritional calculation using automation.
“When we want to give the best possible nutrition, we really need to know what each rider needs on a specific day.”Martijn Redegeld, Performance Nutritionist
Machine learning to the rescue
The first step was to collect the necessary data. A Garmin device on the bike gives us the actuals (like total distance and climbing meters) for each race. A crank-based power meter also gives us a precise calculation of the calories burned. We have a TCX file with GPS coordinates which provides us with metrics on the profile of the race (distance, climbing metres, difficulty, and so on).
We also have information about riders’ weight, height, and role (whether they are a sprinter or a climber, for instance). Finally, we take weather conditions into account. Combining the weather forecast with GPS information and the rider’s location allows us to calculate the wind effect – whether it’s a tailwind or headwind.
Data gathering and visualisation are powered by Smartbase, a data management and analytics platform for athletes. The coaches use this environment to enter the actuals. We then use this data to prepare the forecasts.
Part of the work also entails pre-processing this data and removing outliers. For example, a cyclist might forget to turn off their Garmin device, so we need to exclude the “noise” from the data set. We also made some variables relative, like power, energy and elevation, to make it easier to compare stages and races.
Using training examples, we apply supervised learning to teach our algorithm the outcome of the calorie predictions. This is a regression problem, and we selected random forest as the best machine learning algorithm to solve it.
So, how accurate is the resulting model? We’ve used different metrics to evaluate its performance. For example, we looked at the R-squared of our model and the manual predictions done by coaches. The R-squared measures the strength of the relationship between the model and the dependent variable (calories) on a convenient 0-100% scale.
The machine-learning model got a score of 82%, while the manual predictions got a score of 52%. That means coaches now get the results in a split second, improving accuracy and saving valuable time.
With the calorie estimates powered by machine learning, coaches simply need to enter riders’ calories into an app that provides optimised proportions for each meal in return – an important step in helping our cycling stars do what they do best: work hard and succeed.
“For me as a coach, it’s a lot easier to do the work. It’s also more accurate. The machine-learning model got a score of 82%, while the manual predications got a score of 52%.”Martijn Redegeld