Restricted Boltzmann machine confusing details
The equation from the wikipedia implemented with this code is the one in picture bellow. Sigma function is logistic sigmoid (self._logistic()). The dot product is the sum of products bellow. bj is offset and might be included in the sum (some visible neuron is always 1) or it might be omitted completely for simplicity or something else.