July 20, 2023

Predicting goals scored with Poisson regression in C++

I’ve been interested in the application of statistical learning to football and how the professionals use it in sports betting. I’ve also wanted to get some practice in with C++ and this project kills both birds. The project is available on GitHub: https://github.com/kelanyll/poisson. The classic method that beginners are directed to uses Poisson regression to predict goals scored by both teams in a football match. Libraries for this exist out of the box for most languages known for data analysis like Python and R. Read more

April 16, 2023

How to integrate an external library that doesn't support CMake

If you’re trying to integrate an external library into your project, most of the time you should be able to make use of CMake’s FetchContent. Although, if the external library isn’t compatible with CMake that won’t work. Here are two alternative methods for doing this: Use ExternalProject_Add If you’re using a CMake version >3.2 then you should be able to take advantage of ExternalProject_Add. You can point it at a git repository which makes it very easy to use. Read more

November 16, 2022

Calculating odds with probability theory

When looking at sports betting from a mathematical perspective, one interesting question is where does probability theory come in when calculating odds? And can it help a bookmaker increase their chances of making a profit? I’m going to run through a simple approach to setting odds with an appreciation for the stochastic nature of sports. This content isn’t backed by any real experience of what goes on behind the scenes at bookmakers but it’s an attempt at a sensible approach to calculating odds using probability theory. Read more

September 19, 2022

From a single machine to an encapsulated cloud architecture

Until now this blog and the FPLWrapper service had been hosted on the same EC2 instance. This included Nginx to sit in front of them as a proxy: This obviously wasn’t scalable and could end up being a real pain to redeploy whenever I made any changes. On the other hand, using a more extensive set of AWS services enables me to scale out simpler, automate some operational tasks and only pay for the compute power I use. Read more

September 9, 2022

My soldering debut

A couple months ago, I stumbled upon a YouTuber called StezStix Fix? who mainly posts videos of himself fixing old games consoles. As someone who would break apart electronics when I was younger but never went near a soldering iron, I was fascinated by how fun and simple he made it seem. In an effort to get in on the fun I bought a faulty Playstation 5 controller on Ebay but I’m still working up to that. Read more

August 8, 2022

Building a screenshot emailer service

It can be hard to find job vacancies online that haven’t already been filled. Whilst some job listing sites let you register to receive alerts when new roles are posted, not all sites provide this feature. This led me to search for a service that can email you screenshots of a website at a scheduled interval. I had trouble finding one for free and this got me thinking about how a service like this would work both on a single machine and scaled out into a distributed system. Read more

January 14, 2021

An API for Fantasy Premier League: FPLWrapper

Note: I’ve disabled this API as I’m unable to maintain it. See https://github.com/kelanyll/FPLWrapper for inspiration on writing your own code to fetch data from FPL. Some of us who play Fantasy Premier League (FPL) often rely on data analytics to make decisions about our squad. However, FPL doesn’t provide a public API with which to pull down data. FPLWrapper is an API that allows you to fetch FPL data easily for use in your own analysis. Read more

© Yll Kelani