Posts
Posts that can mix write-ups, project notes, code snippets, and GitHub links in one place.
11 posts
The pairwise interpretation of ROC AUC — 'probability a random positive outranks a random negative' — isn't just a nice intuition pump that happens to give the same number as the curve. It's mathematically the same computation. Here's why, worked through an 8-point example both ways.
Fraud, default, churn, cancer — the outcome you actually care about is almost always the rare one. SMOTE and class weights fix the training problem, but they quietly break your predicted probabilities unless you correct the intercept back afterward. Here's the fix, from King & Zeng (2001).
Wilson confidence intervals are a great governance tool for monitoring behavioural assumptions — but at large sample sizes they get so tight that trivial, immaterial drift starts failing the check. Cohen's h fixes that by measuring the size of the gap, not just whether it's detectable.
Fitting a model by maximum likelihood almost always means calling scipy.optimize under the hood. BFGS, L-BFGS-B, Nelder-Mead, Powell, and basin-hopping all claim to find 'the' maximum likelihood estimate — but they make very different assumptions, and picking the wrong one silently hands you a local optimum instead of the answer you wanted.
In 1956, Edsger Dijkstra designed an algorithm in his head, in 20 minutes, without pen or paper. It still powers Google Maps, internet routing, and game AI today. A complete guide to the mechanics, intuition, and limitations of one of computing's most elegant ideas.
Static behavioural assumptions power ALM and IRRBB models, but they drift. Wilson score intervals give you a statistically sound, auditable way to monitor when they need recalibration — without building a full dynamic model.
When market rates move, customer rates rarely follow one-for-one. Pass-through rates explain the gap, the timing, and the IRRBB risk hiding inside margin forecasts.
After years of being the default, Pandas is hitting its limits on modern data lakehouse workloads. Here's why I switched to Polars + PyIceberg — and why you might want to as well.
PCA rotates a cloud of correlated variables into a new set of uncorrelated axes ordered by variance explained. A complete geometric, mathematical, and practical guide with live interactive 3D projections, standardization demos, scree plots, loading heatmaps, biplots, and more.
The diagnostic that reveals when your predictors are linearly dependent — and why it quietly destroys the reliability of your standard errors, confidence intervals, and t-tests.
Traditional optimization methods often get stuck in local minima. Quantum-Inspired Gradient Descent (QIGD) offers a promising way forward by borrowing ideas from quantum computing — without needing actual quantum hardware.