Which models drive decision-making and policy?

Image for post
Image for post

When COVID-19 swept the world in early 2020, researchers swarmed in with their modelling expertise to forecast epidemic spread and derive optimum interventions. Here’s a high-level view of the whole party.

The majority of mathematical models are derived from the SIR and SEIR compartment models. The primary use cases are population-level forecasting (e.g. predict timing of epidemic peak and hospitalisation numbers) and informing interventions strategies (e.g. lockdowns, quarantine, social distancing and wearing masks).

Define your own rules or let the data do the talking?

Image for post
Image for post

Let’s compare and contrast differential equations (DE) to data-driven approaches like machine learning (ML).

In a nutshell — albeit with caveats — they can be thought of different approaches to modelling various phenomena. Do you make the rules? Or should you let your juicy data learn the rules for you?

Both types of models absolutely drive the world around us. Let’s dig in.

Edit: I have written a sequel article here.

Example DE models

Navier-Stokes (meteorology)

The model behind weather predictions. It is a chaotic model — meaning predictions can be wildly off when using just slightly incorrect inputs. That’s why weather predictions are often wrong! …

A visual explanation + connections with probability

Image for post
Image for post

This article is Part I of an series on deep-diving how machine learning algorithms are evaluated.

Here, we’ll visually review the most popular supervised learning metrics for

  • Classification — Accuracy, Precision, Recall, Fᵦ & AUC; and
  • Regression — MAE, MSE and R².

In short, the more advanced classification metrics allow you to calibrate the importance of Type I and II errors for your use case, while dealing with imbalanced datasets. We’ll also visually explore some connections between classification metrics and probability.

In this and this article, I apply these classification and regression metrics to real-world ML problems in Jupyter using scikit-learn. …

The Secret Sauce Behind Financial Independence

Image for post
Image for post

Albert Einstein is reputed to have said:

“Compound interest is the eighth wonder of the world. He who understands it, earns it — he who doesn’t, pays it.”

Understanding compound interest can transform your life, whether you’re investing for financial independence or scaling your startup business.

1. Compound Interest = Exponential Growth

Many people mistake compound interest for simple interest, which grows your assets linearly. Compounding assets grow exponentially*, which mathematically skyrockets their value. This effect is dramatically enhanced by the interest rate (i.e. exponent) and time in the market.

Consider putting $100 into a variety of asset types in 2010. Even though Bitcoin’s annualised return rate — at 230% — was a crazy 22 times more than the US stock market average of 10.5%, your wealth snowballed way more than 22 times that over a period of ten years. We’re talking a difference of millions of dollars versus just a few hundred bucks in your wallet. …

Regression model trained on 1,883 homes

Image for post
Image for post

Property valuation is an imprecise science. Individual appraisers and valuers bring their own experience, metrics and skills to a job. Consistency is difficult, with UK and Australian-based studies suggesting valuations between two professionals can differ by up to 40%. Crikey!

Perhaps a well-trained machine could perform this task in place of a human, with greater consistency and accuracy.

Let’s prototype this idea and train some ML models using data about a house’s features, costs and neighbourhood profile to predict its value. Our target variable — property price — is numerical, hence the ML task is regression. …

Annualised return of 230% over 10 years. Get ready for a stellar 2021

Image for post
Image for post

Ten years ago, if you put aside $4 for that cup of Starbucks tall coffee into Bitcoin, you’d be sitting on a whopping $688,050 today. Insane right?

That’s an annualised return of 234%. Compare that with:

Data suggests Democrats, but not because of Democratic leadership

Image for post
Image for post

Many are concerned about stock market performance surrounding the election. I am. Let’s take a data-driven deep dive (DDDD) into the situation.

Which party gives higher return to investors?

Short answer: Democrats, but not because of Democratic leadership.

Data shows that stock market returns are on average higher under a Democratic presidency. See Santa-Clara et al. (2003) & Pastor et al. (2017).

Classification model trained on 14,249 employees

Image for post
Image for post

It’s well-known in HR that recruiting new employees is substantially more expensive than retaining existing talent. Employees who depart take with them valuable experience and knowledge from your organisation. According to Forbes, the cost of an entry-level position turning over is estimated at 50% of that employee’s salary. For mid-level employees, it’s estimated at 125% of salary, and for senior executives, a whopping 200% of salary.

We’ll train some machine learning models in a Jupyter notebook using data about an employee’s position, happiness, performance, workload and tenure to predict whether they’re going to stay or leave.

Our target variable’s categorical, hence the ML task is classification. (For a numerical target, the task becomes regression.) …

Battle of the temporal pincers

Warning: This article contains massive spoilers.

Image for post
Image for post

One big loop

The whole film is a big loop, starting on ‘the 14th’ at the Kiev Opera House and ending on that same day at the Soviet closed-city of Stalask-12 and coast of Vietnam. The story tracks four characters — Protagonist, Neil, Kat and Sator — traversing a month forward in time, then a month inverted.


Col Jung

I write about data science, modelling and investing. I make short films on the side.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store