Each of get_lnlikelihood and get_lnprior have a for loop in the HyperModel class to get the relevant parameters for the selected model. This leads to these methods taking much longer than necessary. The parameter indices do not change, and they should instead be decided in __init__. This can be stored in a dict (for example) and called quickly without a for loop.
Each of
get_lnlikelihoodandget_lnpriorhave a for loop in theHyperModelclass to get the relevant parameters for the selected model. This leads to these methods taking much longer than necessary. The parameter indices do not change, and they should instead be decided in__init__. This can be stored in a dict (for example) and called quickly without aforloop.