Probabilistic forecast of European elections in France

Hi all! Just a short post to share the probabilistic forecast of European elections in France I just published on my website (sorry it’s all in French for now, but the graphs are universal :wink: ):

I did all that with python (the website is actually a Pyramid web app) and PyMC3, and I had a lot of fun doing it!
So I thought it could be of interest to some of you, and I wanted to say a huge thanks to all the PyMC devs, in particular @junpenglao, Austin Rochford and @aloctavodia, whose work / books were of great help :clap:
I owe you guys a drink when you come to Paris :champagne:

Hope you’ll enjoy it, and don’t hesitate to drop me a line - feedback or contributions of course more than welcome :wink:
Take care!


Oh that’s awesome! Anyway you can share your model (maybe the __repr__ output from your model set up)?

1 Like

Thank you! :slight_smile:
What do you mean by the __repr__ output? name_of_model.__repr__?

To be honest, I don’t think the code is clean enough to share it yet :grimacing: It’s definitely something I have in mind and wanna work on, but I’m lacking time right now (I’m actually working on a second model: trying to see what we can do with a group-level model :wink: )

if you do name_of_model in a jupyter notebook it should print a latex formatted model - that’s what I meant :sweat_smile:

1 Like

Ha ha ok! I forgot about this functionality! So I’ll do that this week :wink:
I’m a big fan of the model_to_graphviz method too

1 Like

As promised, here is the model’s __repr__ @junpenglao !
As you can see, the model is quite complicated, so the picture is not very clear :joy:
But tell me if you have any question :wink:

Any reason why you are using a Uniform prior in this specific range?

Yeah: it’s the cross-validated error of French pollsters, calibrated to get the results right 5 in 6 times (83%). In other words, based on historic patterns, there is a 5 in 6 chance that the polling error’s magnitude will go as far as 3.1 points (while being unbiased)

Hi again! To answer non-French speakers’ demands, I did an English version of the forecast :wink: :
(I’m actually using a sweet python package to help me started on the translation with Google trad :stuck_out_tongue_winking_eye:)
Any feedback welcome, and take care!