From Prediction to Action — How to Learn Optimal Policies From Data

Photo by Vladislav Babienko on Unsplash

If you know how to build predictive models, you can leverage this knowledge to learn optimal policies – rules that tell you the best way to act in various situations – directly from data.

Policy optimization problems are very common in the business world (e.g., arguably, every personalization problem is a policy optimization problem) and knowing how to solve them is a data science superpower.

The following series of blog posts aims to give you that superpower 🙂

  • In Part 1, I motivate the need to learn optimal policies from data. Policy optimization covers a vast range of practical situations and I briefly describe examples from healthcare, churn prevention, target marketing and city government.
  • In Part 2, I walk through how to create a dataset so that it is suited for policy optimization.
  • In Part 3, I describe a simple (and, in my opinion, magical) way to use such a dataset to estimate the effectiveness of any policy.
  • In Part 4, I show how to use such a dataset to find an optimal policy.

Happy learning!

Share/Bookmark

Lessons from a Deep Learning Master

Photo by Valentin B. Kremer on Unsplash

Yoshua Bengio is a Deep Learning legend and won the Turing Award in 2018, along with Geoff Hinton and Yann LeCun.

In this short post, I want to highlight for you some clever things that Yoshua and his collaborators did to win a Machine Learning competition from a field of 381 competing teams. Perhaps these ideas will be useful in your own work.

In a world where powerful Deep Learning frameworks (e.g., TensorFlow, PyTorch) are a free download away, their competition-winning approach demonstrates nicely that your edge may come from how well you model the specifics of your problem.

Read the rest of the post on Medium.

How to Use Causal Inference In Day-to-Day Analytical Work (Part 2 of 2)

In Part 1, we looked at how to use Causal Inference to draw the right conclusions — or at least not jump to the wrong conclusions — from observational data.

We saw that confounders are often the reason why we draw the wrong conclusions and learned about a simple technique called stratification that can help us control for confounders.

In this article, we present another example of how to use stratification and then consider what to do when there are so many confounders that stratification becomes messy.

Read the rest of the post on Medium.


Data Scientists, Ask Yourself Often: So What?

I used to work at a global management consulting firm many years ago. As a new associate, when I presented the results of my work, I’d often be stopped in my tracks with, “That is interesting. But what is the so what here?”

“So what” was shorthand for several related things.

  • Is there anything actionable here?
  • What should we tell the client to do differently because of this?
  • If we continue down this path, does it get us closer to our ultimate destination?

New associates quickly developed the habit of considering the so-what of their findings before presenting anything. While painful and humbling at first, this turned out to be a very useful habit. It helped us avoid “boiling the ocean”, perform better under time pressure, and made us more productive.

I think data scientists would benefit from cultivating this mindset.

Data science work involves activities that are rife with opportunities to get distracted. Getting the data, exploring the dataunderstanding relationships between variables, formulating a problem, creating a common-sense baseline, building models, tuning hyper-parameters and so on.

Good data scientists tend to be intellectually curious which, of course, is a fantastic thing. But it also means that they are likely to catch the glimmer of a shiny object off to the side of the road and follow it into a rabbit hole. While this is almost always intellectually fun, sometimes it will be useful, sometimes not.

To make sure you are spending your time wisely, you should periodically pause and ask yourself, “What’s the so what here?”.

Is there something concrete and actionable I can get out of this? Does it get me closer to solving the ultimate problem I am working on?

Your answer to the ‘so what’ question doesn’t have to be detailed or exact. It just has to pass a gut check that there’s at least a conceptual path from your current obsession to something useful. If you can’t find a path, you should re-assess if you should switch your focus to something else.

This habit is particularly useful when you start to work on a new problem, especially one posed by someone else and presented to you. As you try to understand and crystallize what exactly needs to be solved, you may come to realize that the problem as defined isn’t actually worth solving because something else is the bottleneck and that needs to be solved first.

Having a so-what mindset gets you to clarity faster and, as a bonus, also builds your reputation in the organization as a pragmatic, clear-thinking data scientist.

All this said, an important caveat.

Ask ‘so what’ in moderation. I am not recommending you become a so-what asking humorless robot.

Going where your curiosity takes you can be useful — you may serendipitously stumble on something valuable in your random explorations. More importantly, it is clearly necessary for one’s happiness. If I couldn’t randomly check stuff out and ‘aimlessly’ play with ideas, I will go crazy.


So explore, follow your curiosity, have fun. But have a background process running in your brain that periodically pops up and asks “what’s the so what here?”.

A Peek into the Incomparable Mind of Isaac Asimov

Isaac Asimov is one of my favorite writers. I recently finished reading It’s Been a Good Life, a compendium of excerpts from his letters, speeches and unpublished writing, curated by his wife Janet Jeppson Asimov.

The book is worth reading in its entirety — it is full of insights, candid self-reflections, pithy statements of his life philosophy, and accounts of pivotal life events. I picked a few below that particularly resonated with me and if they click with you as well, please do read the book.

Read the rest of the post on Medium …