To install all dependencies, execute
pip install -r requirements.txtFor the paper, four test datasets were used, found under data/. Here, each subdirectory contains a test_set.txt and training_set.txt file by default, except for data/mrf/ as it contains further subdirectories 0/-9/, each with test_set.txt and training_set.txt files.
To train the FBM model using all Z-string expectation values up to a fixed locality cutoff, computing the total variation distance in each training step, run:
python scripts/exact_fbm_training.pyTo train the FBM model using a fixed number of randomly sampled Z-strings in each step and finally test the model on the test set, run:
python scripts/fbm_training.pyTo train the free-FBM model using a fixed number of randomly sampled Z-strings in each step and finally test the model on the test set, run:
python scripts/free_fbm_training.pyTo obtain benchmark data from the nonparametric models (random samples, statistical Chow-Liu approximation, discrepancy between training and test sets) run:
python benchmarks/nonparametric_models.pyTo tune, and train the Restricted Boltzmann Machine, run
python benchmarks/train_rbm.pyTo change hyperparameters and problem path, modify the PATH and CONFIG variables in the corresponding python files.