// number of components
elif initialization == "pca":
pca = PCA(n_components=self.n_components)
return pca.fit_transform(X)
// Random initialization with isotropic normal distribution
elif initialization == "random":
return np.random.normal(0, 1e-2, (X.shape[0], self.n_components))
After Change
// number of components
elif initialization == "pca":
pca = PCA(n_components=self.n_components)
embedding = pca.fit_transform(X)
// The PCA embedding may have high variance, which leads to poor convergence
normalization = np.std(embedding, axis=0) * 100
embedding /= normalization