Restricted Boltzmann Machines as Models of Interacting Variables