Boltzmann Machines with MM Algorithms

Provides probability computation, data generation, and model estimation for fully-visible Boltzmann machines. It follows the methods described in Nguyen and Wood (2016a) and Nguyen and Wood (2016b) .

The BoltzMM package allows for computation of probability mass functions of fully-visible Boltzmann machines via and . Random data can be generated using . Maximum pseudolikelihood estimation of parameters via the MM algorithm can be conducted using . Computation of partial derivatives and Hessians can be performed via and . Covariance estimation and normal standard errors can be computed using and .


You can install BoltzMM from github with:



Compute the probability of every length n=3 binary spin vector under bvec and Mmat:

bvec <- c(0,0.5,0.25)
Mmat <- matrix(0.1,3,3) - diag(0.1,3,3)

Generate num=1000 random strings of n=3 binary spin variables under bvec and Mmat.

num <- 1000
bvec <- c(0,0.5,0.25)
Mmat <- matrix(0.1,3,3) - diag(0.1,3,3)
data <- rfvbm(num,bvec,Mmat)

Fit a fully visible Boltzmann machine to data, starting from parameters bvec and Mmat.


For more examples see individual help files.


BoltzMM 0.1.1

Fixed logical operator bug.

BoltzMM 0.1.0

First published version

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.3 by Andrew Thomas Jones, 12 days ago

Browse source code at

Authors: Andrew Thomas Jones , Hien Duy Nguyen , and Jessica Juanita Bagnall

Documentation:   PDF Manual  

GPL-3 license

Imports Rcpp

Suggests testthat, knitr, rmarkdown, bnstruct

Linking to Rcpp, RcppArmadillo, BH

See at CRAN