Can we add model names when we do model comparison?


#1

At the moment, when we run WAIC or LOO comparison of multiple models we get a nice data frame back, and can get a nice plot (like below).
46
But is there a way to provide more readable strings rather than just the model numbers? I guess this could be an additional argument in the compare() function in stats.py. Either that or be able to give the Model class a descriptive name attribute?

I’ve looked at the code on GitHub and there’s nothing I can see that lets you do this currently, unless I’m mistaken. I could swear that I saw an issue on GitHub a while ago saying how to do this exact thing, but I can’t find it any more.


#2

Yes there are two related PR that kind of been forgotten:


Currently, the workaround is:

MODEL_NAME_MAP = {
    0: "Model1",
    1: "Model2"
}

comp_df = (pm.compare([trace1, trace2], 
                      [model1, model2])
             .rename(index=MODEL_NAME_MAP))