The current implementation only supports binary variables, with values in e.g. {-1, +1} and uses some Numba to speed up the Numpy-based algorithms (by a little bit) -- there are certainly more potential speed-ups :)
Currently only tested with Python3.7:
conda create -n my-fg python=3.7
conda activate my-fg
pip install -r requirements.txt
The package assumes the MRF to be in exponential form, that is the distribution over the random variables
can be written as:
where is the partition function (a normalization constant), are the model's parameter, and are the sufficient statistics/factors/potentials.
If you want to see/run the example: click here. And, if you want to
compare to Snorkel you need to install it as follows: pip install snorkel