create account

RE: Soccer Predictions using Python (part 4) by outcast81

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @stevencurrie/soccer-predictions-using-python-part-4

· @outcast81 ·
Hi its me again :)
What data goes into the prediction? You said the system looks back 100 games to make the predictions, just the result? Bookie odds? what does it use? 
Thanks
👍  
properties (23)
authoroutcast81
permlinkre-stevencurrie-soccer-predictions-using-python-part-4-20170923t212303486z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2017-09-23 21:23:03
last_update2017-09-23 21:23:03
depth1
children3
last_payout2017-09-30 21:23:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length176
author_reputation209,754,362,359
root_title"Soccer Predictions using Python (part 4)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id15,741,630
net_rshares944,947,518
author_curate_reward""
vote details (1)
@stevencurrie · (edited)
Hey bud, the only data it uses is the scores from the previous games.  We take averages for home and away goals in the competition, then the averages for each team we want to predict, use these to calculate expected goals for each team.  These are then used to pick random samples from the poisson distribution which get averaged out to give us our prediction.  [Here](https://www.pinnacle.com/en/betting-articles/Soccer/how-to-calculate-poisson-distribution)'s an excellent description of the process - it's the one I followed to get started.
👍  ,
properties (23)
authorstevencurrie
permlinkre-outcast81-re-stevencurrie-soccer-predictions-using-python-part-4-20170923t220838373z
categoryprogramming
json_metadata{"tags":["programming"],"links":["https://www.pinnacle.com/en/betting-articles/Soccer/how-to-calculate-poisson-distribution"],"app":"steemit/0.1"}
created2017-09-23 22:08:39
last_update2017-09-23 22:34:15
depth2
children2
last_payout2017-09-30 22:08:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length543
author_reputation7,132,661,654
root_title"Soccer Predictions using Python (part 4)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id15,744,005
net_rshares2,036,356,883
author_curate_reward""
vote details (2)
@outcast81 · (edited)
You are guilty for making me lose a couple of hours already, boy I look dumb staring at all this stuff on my screen, we have a saying in portuguese, "like an ox  staring at a palace".
Wouldn't going so far back in games kind of ruin the prediction a bit, when calculating averages for each team? (Because you go into past seasons, diferent players, managers etc.)

Anyway I tried to run your code and got this error: ModuleNotFoundError: No module named 'pandas'
I need the database right? Can I use my own database?

The possibiltys with this are immense, unfortunatly my knowledge of this isn't.
👍  ,
properties (23)
authoroutcast81
permlinkre-stevencurrie-re-outcast81-re-stevencurrie-soccer-predictions-using-python-part-4-20170923t233320223z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2017-09-23 23:33:21
last_update2017-09-23 23:35:30
depth3
children1
last_payout2017-09-30 23:33:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length597
author_reputation209,754,362,359
root_title"Soccer Predictions using Python (part 4)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id15,747,956
net_rshares907,149,618
author_curate_reward""
vote details (2)
@stevencurrie · (edited)
It looks like going further back helps more than hinders.  The backtest tries everything from 50 to 500 games and most competitions I've tested with seem to do best considering around 400 games.  I believe there are 380 games in a season of the Premier League so it looks like a full year worth of history would be a sensible default.

No database required.  For the pandas error, you can use your package manager (synaptic probably) to install "python3-pandas".

Or try  ```pip3 install pandas``` from the command line.

You'll likely need to install python3-bs4, python3-selenium and python3-numpy as well.

If you have any other issues, let me know which distro you're using and I'll help as best as I can.

Steven
👍  
properties (23)
authorstevencurrie
permlinkre-outcast81-re-stevencurrie-re-outcast81-re-stevencurrie-soccer-predictions-using-python-part-4-20170923t234729275z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2017-09-23 23:47:30
last_update2017-09-23 23:57:15
depth4
children0
last_payout2017-09-30 23:47:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length717
author_reputation7,132,661,654
root_title"Soccer Predictions using Python (part 4)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id15,748,569
net_rshares1,101,244,738
author_curate_reward""
vote details (1)