def _make_random_matrix(self, n_components, n_features):
        random_state = check_random_state(self.random_state)
        self.density_ = _check_density(self.density, n_features)
        return sparse_random_matrix(n_components,
                                    n_features,
                                    density=self.density_,
                                    random_state=random_state)
Generate the random projection matrix
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/random_projection.py/SparseRandomProjection._make_random_matrix