'Computes the probabilities P(h=1|v).
Parameters
v : array-like, shape (n_samples, n_features)
Values of the visible layer.
Returns
h : array-like, shape (n_samples, n_components)
Corresponding mean field values for the hidden layer.'

def _mean_hiddens(self, v):

    p = safe_sparse_dot(v, self.components_.T)
    p += self.intercept_hidden_
    return expit(p, out=p)
