← Back to project

Play First, Understand Later

Five chapters, a master dataframe with nearly 120,000 rows, four trained models, SHAP, customer segmentation. Before any explanation, here's the whole result in your hands. Drag the slider, spin the scatter, switch the map's metric. If something catches your attention and you want to understand the "why" behind it, start with Chapter 1, this showcase doesn't replace the journey, it just opens the appetite. The freight, revenue and simulator panel further down comes from a separate notebook, public on Colab.

The threshold that decides "will be late" or not

Chapter 4 trained two models to predict delivery delay, and Chapter 5 found that at the default threshold (0.5) both were practically blind. Drag it and find the point where each one wakes up.

Loading real data...

The four customer types, in 3D

Chapter 5's clusters, recency on the x axis by default, amount spent as height, purchase frequency as depth, but you can swap which dimension goes on which axis. Spin it and notice how the occasional big spender and the repeat customer practically hide inside the cloud of one-time buyers, and check each group's real numbers in the table below the chart.

Loading real data...

Four models, four metrics, one chart

Baseline, Logistic Regression, Random Forest and XGBoost on the delay scenario. Notice how Baseline and Random Forest practically vanish outside the AUC axis.

Loading real data...

Revenue by category, as blocks

The same data from Chapter 2, now as proportional blocks instead of a bar chart, each rectangle sized to the category's real revenue.

Loading real data...

From the customer's region to the review score

Region → delivery status → score bucket, the whole logistics funnel in a single flow.

Loading real data...

Freight, revenue and freight paid, by state (and by city if you click)

Three metrics no earlier chapter showed: freight as a fraction of order value, total revenue, and freight paid, by state. Click a state on the map and it opens that state's top 10 cities on the same metric.

Loading real data...

Monthly revenue, on your own period

Drag the two handles and pick the time window. The total below sums only what falls inside the selected period, live.

Loading real data...

What if your product were different? Simulate the freight

The most "ML applied to everyday management" piece of all: adjust the weight, dimensions and distance, and the predicted freight recalculates live, using the coefficients of a Linear Regression trained on the same Chapter 4 data.

Loading real data...

Curious?

That was just the result. If you want the full process (the relational model, the data leakage that nearly fooled an entire model, the threshold, the SHAP), start with Chapter 1.