←BaldanAll skillsLet's talk

Skill 01 / 06

Turning history into predictions people can act on. Every project below was rebuilt from scratch, and the live ones run right in your browser.

17

live demos

17

projects in the lab

6

step method

0

servers needed

How machine learning learns

A line, two knobs, and a lot of small steps.

Before the projects: the idea behind all of them, shown on real data and computed live in your browser.

0055101015152020FIRST-TERM GRADE (0–20)FINAL GRADE (0–20)SLOPE KNOB →INTERCEPT KNOB →start (0, 0)DARKER = SMALLER MISS

This line + a squash

Logistic regression: the same knobs, then a curve that turns the sum into a chance. Churn, credit, fraud, health.

10 projects

Questions instead of knobs

Decision trees learn which yes/no question splits the data best, then the next one.

Machines, insurance

No answers to learn from

K-means and NMF find groups and themes by themselves.

Segments, reviews

Counting and comparing

Baselines, z-scores and similarities: sometimes the simplest model wins.

Taxi, recommender

How I do it

  1. 01

    Frame the problem

    Turn a business question into a target and one metric everyone agrees on.

    SQLStakeholder notes
  2. 02

    Explore the data

    Distributions, gaps and leaks before any model touches it.

    PandasPlotly
  3. 03

    Engineer features

    Encode, scale and build the signals a model can actually use.

    scikit-learn Pipelines
  4. 04

    Train & validate

    Several models, honest validation, the test set kept for the very end.

    Cross-validationGrid search
  5. 05

    Explain

    Choose the model people can read and trust, not just the top score.

    CoefficientsFeature effects
  6. 06

    Ship

    Export it so anyone can try it, right here in the browser.

    JSON exportTypeScript

Every project in the lab goes through these steps. Pick one and try it.

Go to the projects17

The toolkit

Every model is trained offline with open-source Python, exported as a small JSON file, and re-run in TypeScript. No server, no API key: the demos work the moment the page loads.

01 · Open data

17 public datasets, each with its source and licence on the project page.

hover or tap a logo ↑

02 · Train in Python

One reproducible script cleans, compares and validates every model.

hover or tap a logo ↑

03 · Export

Models become small JSON files: coefficients, tree nodes, neighbour lists, chart data.

tap the file ↑

04 · Run in your browser

The same maths re-implemented in TypeScript, so every demo works with no server.

hover or tap a logo ↑

The models

18

final models

8×

logistic regression shipped

0 / 12

forests & boosting shipped / tried

Random forests and gradient boosting were benchmarked in 12 projects and often scored a little higher. None shipped: the gaps were small (each one is shown on its project page), and the simpler model explains every prediction and runs in your browser.

AlgorithmTelco churnHeart failureMall segmentsNYC taxiBank churnCredit riskStudent gradesMachine defectsAir qualityBike demandCard fraudInsurance fraudRecommenderComplaint routerUplift promoHouse price rangeFeedback themesShipped

Logistic RegressionLinear · classification

8 / 10

Ridge RegressionLinear · regression

3 / 4

Quantile regressionLinear · intervals

1 / 1

Decision TreeTree · rules

1 / 2

Linear SVMLinear · margin

0 / 2

Naive BayesProbabilistic · text

0 / 2

Random ForestEnsemble · bagging

0 / 7

Gradient BoostingEnsemble · boosting

0 / 11

Uplift meta-learnersCausal · uplift

1 / 1

K-MeansClustering

1 / 1

Topic model (NMF)Unsupervised · text

1 / 1

Robust z-scoreStatistics · anomaly

1 / 1

Item-item cosine similarityRecommendation

1 / 1

Association rulesRecommendation

0 / 1

Baseline rulesSanity check

0 / 5
final model, running in the demo compared, not shippedClick a project name to open it.

The methodology

Split honestly

Test on data the model has never seen, the way it will meet the future.

Price the mistakes

A missed fraud and a false alarm don't cost the same, so the metric shouldn't pretend they do.

  • Cost-aware threshold

    Bad loan approved costs 5× a good one declined → cut-off 0.17

  • Class weights

    Each fraud weighted ~518× while training

  • Review-budget metrics

    Frauds caught in the top N alerts an analyst can check

  • Gains & lift

    Who to call first when the budget only covers some customers

  • Alert threshold sweep

    Detected events vs false alerts at every cut-off

  • Confidence threshold

    Act automatically only when the model is sure; hand the rest to a person

  • Budget curves

    Extra visits for every share of the list you can afford to contact

Hunt for leaks & bias

A score that looks too good is a question, not a result.

Beat a baseline, then explain

Prove the model beats a simple rule, then pick the one people can read.

Scored withROC-AUCAverage precisionF1Macro-F1Top-3 accuracyFrauds in top NMAER²SilhouetteHit@5QiniPinball lossInterval coverageNPMI coherence

The lab

Next skill

Deep Learning & Vision

Neural networks for images, text and time series.

Open