andre-martins / AD3

Alternating Directions Dual Decomposition
GNU Lesser General Public License v3.0
68 stars 38 forks source link

Supporting hard logic on multi-valued variable as explained in ICML 2011 paper #16

Closed jlmeunier closed 7 years ago

jlmeunier commented 8 years ago

Hi,

I needed inference with hard logic constraints in pystruct, so I implemented in AD3 what is explained in your ICML 2011 paper (graph binarization).

For AD3, it amounts to one additional simple_constrained_inference.py module. Works nicely. The auto-tests are happy (well... they spot the same problems).

BTW: I had to re-compile AD3 from the latest source to get some of the required methods. Despite same version number, the AD3 coming with Anaconda2 is outdated.

Best,

JL

ps: I'll open a pull request to pystruct as well from https://github.com/jlmeunier/pystruct

jlmeunier commented 7 years ago

Hi again, another update to support nodes of different nature (I call them node type). Each type has its own number of states. This is required to support a new model in pystruct (which I contributed too) Thanks JL