A Ruby port of Ed Chen's Python RBM implementation.