Measure your marketing impact

THE MAGPIE JOURNAL

Machine Learning for Marketing Mix Modeling | Magpie

Using machine learning for marketing mix modeling

By: Thijs

I'm usually pretty critical when it comes to marketing mix modeling. It's often overhyped, especially when it's combined with sloppy validation and data that isn't random enough. That leads to poor results.

But when it's done right, MMM is a very valuable tool. In the Magpie stack, we simply couldn't deliver the same results without it. And one part of how we do it right might surprise you: we still use machine learning models next to Bayesian ones.

Why everyone switched to Bayesian MMM

Over the past few years, almost everyone in our field has switched to Bayesian marketing mix models. There's a good reason for that. You can set priors.

Priors let you add some common sense to your model. They have saved data scientists a lot of sweat trying to explain results that make no sense.

Try explaining to a room full of marketers why the model shows a negative effect for display campaigns. Spending more on display would mean selling less? Nobody believes that, and they're probably right. With priors, you just add a sensible one and the channel can't drop below zero anymore.

I built a lot of non-Bayesian models before. The first time I used a Bayesian model, it felt like going from a bicycle to a Ferrari.

What I started to miss

But along the way, I started missing my machine learning models.

They're powerful and flexible, and they often show you things you won't find otherwise. Most of all, they give you feedback. If a channel turns out negative in a machine learning model, the model doesn't hide it. It forces you to go back and question your assumptions.

Was the data random enough? Did I use the right variables? Is the model picking up the right dynamics? Is something else happening in the same weeks, like a promotion or a price change?

A prior can quietly cover up those problems. The negative effect disappears, but the reason behind it is still there. Maybe display spend always went up in weeks when sales were already dropping. Maybe the data just doesn't contain enough variation to separate display from other channels. A machine learning model shows you the problem. A prior can make it look solved.

That kind of feedback is essential for the health of your model.

To go back to the Ferrari: it's fast and smooth. But for your fitness, sometimes you should take the bike.

What machine learning does well

Machine learning models are very good at capturing interaction effects. These are situations where the effect of one thing depends on another.

Take payday. Your marketing might work better in the days after people get paid, because people have more to spend. In a classic model, you'd have to think of that effect yourself and build it in by hand. A machine learning model can find it in the data on its own.

The same goes for saturation. At some point, extra spend on a channel adds less and less. In a classic or Bayesian MMM, you choose the shape of that curve in advance. A machine learning model learns it from the data. Other interactions work the same way: TV that makes your search ads perform better, or campaigns that work differently in high season than in January.

How we combine them

I'm not saying machine learning MMM is the only answer. It has its own weak spots. It needs enough data, and it can be harder to explain to a marketing team than a model with clear assumptions.

That's why we don't choose. We use both and compare them. When the Bayesian model and the machine learning model agree, we can be more confident. When they don't, that's the signal to dig deeper before anyone moves budget. And where we can, we check both against real experiments, like conversion lift studies or geo tests.

So, should you use it?

I'd argue machine learning belongs in every serious MMM toolkit. Not instead of Bayesian models, but next to them. Especially if you're after results that hold up in the real world, and not just results that look logical in a presentation.

Some customers were going to buy anyway.

Some marketing actually creates customers.

Magpie Technology. All rights reserved, 2026.

Some customers were going to buy anyway.

Some marketing actually creates customers.

Magpie Technology. All rights reserved, 2026.