lucasmaystre / choix

Inference algorithms for models based on Luce's choice axiom
MIT License
157 stars 27 forks source link

Unexpected argument 'alpha' for opt_pairwise #5

Closed victorkristof closed 6 years ago

victorkristof commented 6 years ago

Hi @lucasmaystre,

When using choix.opt_pairwise, setting alpha raises an error:

TypeError: opt_pairwise() got an unexpected keyword argument 'alpha'

But the doc suggests it should be possible to set it :)

Example code:

import choix

n_items = 5
data = [
    (1, 0), (0, 4), (3, 1),
    (0, 2), (2, 4), (4, 3),
]

choix.opt_pairwise(n_items, data, alpha=0.1)
lucasmaystre commented 6 years ago

Hi @victorkristof , you might be using an old version of the library. The change that introduces that parameter is "only" 7 months old: https://github.com/lucasmaystre/choix/commit/4ae8793888b563d26ceec4b70dfb590ed9332be1

victorkristof commented 6 years ago

Makes perfectly sense - updating the library solved it, thanks!