r/MachineLearning • u/bweber • 1d ago
Project Hands-on ML for mobile ads: an open-source book and market simulator, from logistic regression to transformers [P]
I've spent the past five years in adtech, leading ML teams on mobile ad bidding at Chartboost and Aarki, and worked in mobile gaming before that. I wrote the book I wish I'd had when I started, about how ML in a Demand-Side Platform (DSP) for user acquisition works. Companies like AppLovin and Moloco have shown how far ML can take a DSP.
The book and all of its code are open source, built around a simulator that runs on your machine: a simulated mobile ad market, a reference bidder in Go, and a Python training service that publishes models back to the bidder. The simulator writes the ground truth behind every impression, so you can check a model's calibration against the true rates, and the models progress the way a real DSP's do:
- Crawl: logistic regression (FTRL) click model with hashed features, plus simple pricing
- Walk: LightGBM click and install models, win-rate models and bid shading, pacing, A/B tests, incrementality, and monitoring with incident drills
- Run: deep models with embeddings, transformers over device event sequences, value and uplift models, RL pacing
Crawl and walk run end to end today, and the repo has a walkthrough of every exercise. The run chapters are drafted, and their simulator exercises are what I'm building next.
Everything is free: the online edition, plus PDF and EPUB copies on the GitHub releases page. The text is CC BY-NC-SA and the code is MIT, and contributions are welcome, from typo fixes to new exercises.
- Code and simulator: https://github.com/bgweber/AdtechBook
- Free online book: https://bgweber.github.io/AdtechBook/
- PDF and EPUB: https://github.com/bgweber/AdtechBook/releases/latest
I'd love feedback on the simulator: whether it runs cleanly for you, and what you'd want it to simulate next.
1
u/Present-Square-5823 1d ago
Its Huge. Thx