'Perform one Gibbs sampling step.
Parameters
v : array-like, shape (n_samples, n_features)
Values of the visible layer to start from.
Returns
v_new : array-like, shape (n_samples, n_features)
Values of the visible layer after one Gibbs step.'

def gibbs(self, v):

    check_is_fitted(self, 'components_')
    if (not hasattr(self, 'random_state_')):
        self.random_state_ = check_random_state(self.random_state)
    h_ = self._sample_hiddens(v, self.random_state_)
    v_ = self._sample_visibles(h_, self.random_state_)
    return v_
