Machine Learning vs. Mathematical Modelling in Practice

This is the fourth instalment in our blog series answering the question “With regards to scheduling, route and fleet optimization - what is artificial intelligence, and how does it compare to machine learning, or other technologies?”

You can read the first part in the series, a look at artificial intelligence in general, here.

Part 2 covers machine learning, and Part 3 covers mathematical models.

In this fourth instalment, we’re going to answer our original question, and look at how machine learning and mathematical models get applied in the realm of scheduling, routing and fleet optimization.

What is Machine Learning?

If you haven’t yet, we’d recommend that you review our post about this.  Essentially, machine learning works by giving computers the ability to “learn” with data by example.

There are various alternatives for algorithms and methods, but in a nutshell, to train it, we give the chosen machine learning algorithm an input, tell it what the result should be, and it gradually builds the ability to predict the result without us telling it the answer.

What is a Mathematical Model?

Again, if you haven’t read our full post about this, it’s recommended you do that now.

Stated briefly, a mathematical model describes how something in the world works in mathematical terms.  They’re a quantitative way to describe systems.

Revisiting the Baseball Example

We talked earlier in the series about an example problem in which you could apply both machine learning or a mathematical model - trying to predict where a baseball player would hit a ball.

You could use each technique separately to predict where a ball is going to land.

With machine learning, you would take all of the player’s previous hit data, feed in the inputs (pitch speed, placement, etc.) and tell the machine learning algorithm where the ball landed.  It would gradually develop the ability to predict where the ball would go when hit, given a particular set of inputs.

With mathematical modeling, you would build a model (an equation, in this case), which would take the inputs (ball speed, initial velocity, etc.), and using the laws of physics, you could come up with a very good prediction for where the ball will land.  First year physics and engineering students solve these kinds of problems - projectile motion - all the time.

There are advantages and disadvantages to each.

Advantages and Disadvantages of Machine Learning

Advantages of machine learning

  • The main advantage of machine learning is that the “intelligence acquisition” and refinement can be automated.

  • The model may account for things which were not considered originally, but happen regularly - decreases in performance late in games, bats breaking, difficulty against certain opponents, etc.

Disadvantages of machine learning

  • In reality, it is more difficult to automate than in theory and so the training typically requires a machine learning expert to tweak the model and training to get desired results.

  • Developing a model with machine learning would require a lot of historical data.

  • The training of the model requires significant compute power and time.  

  • Time to results is not often predictable.

  • Solutions may not be exact and often contain strong assumptions from the modelers.

Advantages and Disadvantages of Mathematical Models

Advantages of mathematical models

  • With expert knowledge (in this case, someone familiar with projectile motion), a good solution could be developed almost immediately.

  • Getting solutions based on input data requires little compute power and time.

  • Exact solutions would likely be possible given accurate inputs.

  • These models would be reliable and consistent within the constraints of the model.

  • First principle approaches better shield against algorithm bias injected by the modeler.

Disadvantages of mathematical models

  • The constraints of the model may not produce solutions that are as robust in a real-world context as the machine learning model.

  • Factors outside the model, like disruptions (bats breaking, etc.) would not be taken into account.

  • Expert knowledge is required, and typically the more advanced or niche the model required, the more difficult it will be to find such an expert.

  • Overall the main disadvantage is that building the expert knowledge requires an actual understanding of the modeled phenomenon or process:

    • Critical but rarely occurring details may create too much complexity in the model.

    • Finer detail models are much more compute-time intensive.

The Ideal Model

Both machine learning and mathematical models offer particular advantages in this example, and in an ideal world, one might be able to combine the two.

Such a solution would have the exact nature and low compute power of the mathematical model, but could introduce some robustness to the model through machine learning.  This could take the form of an added buffer based on various factors, like the number of disruptions expected, or the gradual decline in a player’s performance through their career or through a long season, for example.

This is exactly how we use machine learning and mathematical models in the context of logistics.

Mathematical Models and Machine Learning in Logistics and Scheduling

The above example hopefully illustrated how we use mathematical modeling and machine learning in developing our solutions for logistics.  

Mathematical models provide the core of our technology, and our team has the deep expertise required to build such models in a real-world context, which is rare.

Then we use machine learning when possible to enhance the models, making the more robust, more predictive, and to generate better solutions overall.

In the logistics context, let’s say our aim was to reduce the total deadhead (empty flights) for a given fleet of aircraft:

  1. We would build a mathematical model taking into account the aircraft type, flight speeds, distances between airports, minimum number of passengers, range, etc.

  2. This model would minimize the deadhead for the fleet, and vastly reduce scheduling time, and should be able to produce solutions right away (no training required).

  3. However, we know that the schedule is going to continue to change until the last minute, and we want to minimize the number of changes we need to make to the schedule.  The company we’re working with has a great historical dataset on the flights they’ve completed in previous years.

  4. We could use machine learning to examine this dataset for things like

    • how many flights are canceled last minute,

    • which flights get repeated year after year,

    • overall demand expected month-to-month, or week-to-week, and

    • disruptions caused by weather in each month of the year.

  5. The results of this analysis can then be incorporated into the mathematical model, reducing the number of changes required to the initial schedule produced, and ultimately reducing disruptions.

Machine learning and mathematical modelling both have their place in the scheduling world.  Neither is usually a perfect solution in the context of the real world, but together, you can get the benefits of both.

Get our Artificial Intelligence in Transportation e-book here.

Get a PDF version of this blog post: