Use Box Plots with Caution!

They Can Be Misleading.

Use Box Plots with Caution!
πŸ‘‰
Hey! Enjoy our free data science newsletter! Subscribe below and receive a free data science PDF (530+ pages) with 150+ core data science and machine learning lessons.

TODAY'S ISSUE

TODAY’S DAILY DOSE OF DATA SCIENCE

Use Box Plots with Caution!

Box plots are pretty common in data analysis.

Yet, they can be highly misleading at times.

Let’s understand how!


To begin, a box plot is a graphical representation of just five numbers:

  • min
  • first quartile
  • median
  • third quartile
  • max

This means that if two entirely different distributions have similar five values, they will produce identical box plots, as depicted below:

As depicted above, three datasets have the same box plots, but entirely different distributions.

This shows that solely looking at a bar plot may lead to incorrect or misleading conclusions.

Here, the takeaway is not that box plots should not be used.

Instead, the takeaway is that whenever we generate any summary statistic, we lose essential information.

Thus, always look at the underlying data distribution.

For instance, whenever I create a box plot, I create a violin (or KDE) plot too. This lets me validate whether summary statistics resonate with the data distribution.

In fact, I also find Raincloud plots to be pretty useful.

They provide a pretty concise way to combine and visualize three different types of plots together:

  • Box plots for data statistics.
  • Strip plots for data overview.
  • KDE plots for the probability distribution of data.

Impressive, isn't it?

That said…

Building end-to-end projects has taught me MANY invaluable technical lessons and cautionary measures, which I hardly found anyone talking about explicitly.

I covered 8 more pitfalls and cautionary measures here: β€‹8 Fatal (Yet Non-obvious) Pitfalls and Cautionary Measures in Data Science.

Moreover, I have seen that many ML engineers quickly pivot to building a different model when they don't get satisfying results with one kind of model.

They do not fully exploit the possibilities of existing models and continue to move towards complex ones.

However, after building so many ML models, I have learned various techniques that uncover nuances and optimizations we could apply to significantly enhance model performance without necessarily increasing the model complexity.

I shared 11 such high-utility techniques here: β€‹11 Powerful Techniques To Supercharge Your ML Models.

πŸ‘‰ Over to you: What other measures do you take when using summary statistics?

ROADMAP

From local ML to production ML​​​

Once a model has been trained, we move to productionizing and deploying it.

If ideas related to production and deployment intimidate you, here’s a quick roadmap for you to upskill (assuming you know how to train a model):

This roadmap should set you up pretty well, even if you have NEVER deployed a single model before since everything is practical and implementation-driven.

THAT'S A WRAP

No-Fluff Industry ML resources to

Succeed in DS/ML roles

At the end of the day, all businesses care about impact. That’s it!

  • Can you reduce costs?
  • Drive revenue?
  • Can you scale ML models?
  • Predict trends before they happen?

We have discussed several other topics (with implementations) in the past that align with such topics.

Here are some of them:

  • Learn sophisticated graph architectures and how to train them on graph data in this crash course.
  • So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches here.
  • Run large models on small devices using Quantization techniques.
  • Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using Conformal Predictions.
  • Learn how to identify causal relationships and answer business questions using causal inference in this crash course.
  • Learn how to scale and implement ML model training in this practical guide.
  • Learn 5 techniques with implementation to reliably test ML models in production.
  • Learn how to build and implement privacy-first ML systems using Federated Learning.
  • Learn 6 techniques with implementation to compress ML models.

All these resources will help you cultivate key skills that businesses and companies care about the most.

Our newsletter puts your products and services directly in front of an audience that matters β€” thousands of leaders, senior data scientists, machine learning engineers, data analysts, etc., around the world.

Get in touch today β†’


Join the Daily Dose of Data Science Today!

A daily column with insights, observations, tutorials, and best practices on data science.

Get Started!
Join the Daily Dose of Data Science Today!

Great! You’ve successfully signed up. Please check your email.

Welcome back! You've successfully signed in.

You've successfully subscribed to Daily Dose of Data Science.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.