Wrapped up the project today.
The highlight was finally getting the whole pipeline working from start to finish. train_v1.py trains a Poisson GLM on old match data, dumps the coefficients into model.js. app.js grabs those in the browser to generate live win/draw/loss odds and full score predictions. Seeing everything actually work together for the first time was such a good feeling. It wasn’t at all smooth, though. First, I made a stupid typo: I wrote factorials(k) instead of factorials[k]. That completely killed the predictor for a while. Once I fixed that, I found an even dumber bug. I’d been multiplying the home team’s Poisson probabilities by… the home team’s Poisson probabilities. So the model had basically spent the afternoon thinking every match was a team playing against its own clone. Then JavaScript decided it wanted to be funny. I used regular quotes instead of backticks in a few places, so instead of showing the actual values, my UI was proudly displaying stuff like ${pct}%. A lot of debugging, a few “how is this even happening?” moments, and way too many commits later, it’s finally done. The predictions make sense, the frontend actually shows legit numbers, and I can stop lying to myself that bugs are “features.”
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.