Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Friday, 24 August 2018

How'm I doin' so far? - Part 3


Asleep at the wheel

After reaching dizzying heights of up £16.57 from £1 bets something strange happened. After Easter some teams who were safe from relegation but no chance of playoff/Europe spots just stopped showing up.

It makes perfect sense when you think about it, but when you’re a computer algorithm that hasn’t been trained to know about such “sleepwalking to the end of the season” it takes you by surprise. The model thought these teams would play as well as they should do whereas the human punters I’m competing against knew better. The model thought is saw value where there was none and plummeted to only £1.30 up.

What’s that done to the graph?


A rapid decline.

I’m faring better with the start of the new season and have climbed back to currently £4.80 up.

Lessons Learned

When building the model I was aware of some cases where a team would not perform as well as past data would suggest, notably newly promoted teams go from being the best in their league to one of the worst. I accounted for this by introducing a different-division factor, which was essentially a value between -1 and 1 showing what proportion of past games used by the model were played in a different division, with negative being in a lower division and positive in a higher one. 0 means all sampled games were in the same division.

This variable alone made a significant improvement in the accuracy of my model. I should have applied this logic to games remaining in the division, and what they had to play for.
It seems fairly consistent how many points are needed for safety and playoff positions year by year, were I to retraining the model I would this time calculate how many games each team had remaining, how many points they had, and how many they were off/above playoff/safety as this should help protect against this false value.

Either that or I’d just turn the Pi off after Easter

Re-train?

I’d like to retrain the model with new variables at some point but regrettably it won’t be soon. I’m currently working on Ice Hockey analysis which I hope to start publishing in a different platform soon, but it would be nice if I can get the new model up and running by Easter. In either case I’ll keep this current model going as long as I can stop the scraping scripts from falling-over for.

Monday, 26 February 2018

How'm I doin' so far?


System.out.println("Hello, World");

In a first for this blog, this post is written by a human. To explain, the other posts have been procedurally generated by a Raspberry Pi using machine learning and statistics to predict outcomes and identify under-valued picks. You can read more about it on my personal blog here, however Blogger has a much friendlier API for bots to post to which is why my bot has its own blog.

11 Days* In

It’s been a great start, the model uses £1 stakes for comparison and after 11 days it is up £6.63 as depicted on the below chart:


There aren't many mid-week games this week so this wont change much before the weekend, I'll probably update the chart in s few weeks time.

Moneyball

A great start however it has been “lucky”, in the sense that it has thus far returned significantly greater than the sum of calculated probable returns. The model has been designed to seek out a profit but the high fluctuations combined with the relatively low number of observations for a machine learning problem mean I will not claim this is a winning formula.

Before this bot went live I simulated it against the entire 2016-2017 season (the model was trained out-of-band on games prior to this), and then verified again on games prior to the live date and it did still show a modest profit:


Peaks and Troughs

The line stays above zero which would make you think it’s a profitable solution, but consider if the graph’s timeframe started at the highest peak in the middle with that point being zero. In that case it would have been negative for the duration.

What I’m trying to say is a good start should not be considered indicative of future success. This kind of maths is better suited to baseball where teams play 162 games a year, and an individual’s effort can arguably contribute more to the game’s outcome.

*Technically it’s only nine calendar days, however the bot has said not to bet on today & tomorrow’s games so the status will be the same after 11 days.