Mixed hierarchical model to predict MMA fights

Hey Andrew and Christian,

Thanks for the ping, and also for the friendly email :slight_smile: I’m not that active here these days, I’d like to be, but I’m not finding much time at the moment, unfortunately.

Regarding your questions: If you’re interested in multiple outcomes, maybe reading about a multinomial regression would be helpful. I had a look and it looks like @cluhmann previously (How to fit multivariate multinomial model) referred to a notebook: https://nbviewer.org/github/cluhmann/DBDA-python/blob/master/Notebooks/Chapter%2022.ipynb . That seems to link to the Kruschke book. So that’s where I would look. Try to code up a multinomial logistic regression, then see if you can link things back to your problem. I was looking but in tennis I’ve usually just done binary outcomes, not multivariate, so I unfortunately don’t have any code that’s immediately applicable.

Looking at the error you’re getting, it seems like a shape issue. I think your first input should indeed have shape[1]=3 – one column for each outcome – but fight_outcome should probably just be a vector of the length of your data points. Basically, if you have N data points and M outcomes, I think p should be of shape N x M, and observed should be N (please correct me if I’m wrong @cluhmann ).

Hope that at least gets you started, let me know!

3 Likes