'Compute the hidden layer activation probabilities, P(h=1|v=X).
Parameters
X : {array-like, sparse matrix} shape (n_samples, n_features)
The data to be transformed.
Returns
h : array, shape (n_samples, n_components)
Latent representations of the data.'

def transform(self, X):

    check_is_fitted(self, 'components_')
    X = check_array(X, accept_sparse='csr', dtype=np.float64)
    return self._mean_hiddens(X)
