better / convoys

Implementation of statistical models to analyze time lagged conversions
https://better.engineering/convoys/
MIT License
258 stars 42 forks source link

TypeError when run w/ emcee 3.0.0 #118

Closed johnabsher closed 4 years ago

johnabsher commented 5 years ago

Typeerror __init__() got an unexpected keyword argument 'dim' convoys is thrown when attempting to run with emcee 3.0.0.

The code in question is in regression.py (~line 248):

sampler = emcee.EnsembleSampler(
    nwalkers=n_walkers,
    dim=dim,
    lnpostfn = generalized_gamma_loss,
    args=args,
)  

I was able to fix it by changing dim to ndim and lnpostfn to log_prob_fn - no other changes were required.

johnabsher commented 5 years ago

This is only an issue in the package version currently hosted on pypi

erikbern commented 5 years ago

oh yeah, good point, i haven't uploaded the latest version to pypi yet. will do tonight. thanks!