def ising_b(self, for_sampling=False):
        if not hasattr(self, 'sampling_b_stdev'):
            self.sampling_b_stdev = None
        if for_sampling and self.sampling_b_stdev is not None:
            return self.noisy_sampling_b
        else:
            if self.layer_above is not None:
                return 0.5 * self.boltzmann_b + \
                    0.25 * self.W.sum(axis=0) + \
                    0.25 * self.layer_above.W.sum(axis=1)
            else:
                return 0.5 * self.boltzmann_b + 0.25 * self.W.sum(axis=0)
.. todo::
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/dbm/ising.py/BoltzmannIsingHidden.ising_b