def transform(self, X):
        check_is_fitted(self, "components_")

        X = check_array(X, accept_sparse='csr', dtype=np.float64)
        return self._mean_hiddens(X)
Compute the hidden layer activation probabilities, P(h=1|v=X).
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/neural_network/rbm.py/BernoulliRBM.transform