# Initialization¶

openTSNE.initialization.pca(X, n_components=2, svd_solver='auto', random_state=None, verbose=False)[source]

Initialize an embedding using the top principal components.

Parameters: X (np.ndarray) – The data matrix. n_components (int) – The dimension of the embedding space. svd_solver (str) – See sklearn.decomposition.PCA documentation. random_state (Union[int, RandomState]) – If the value is an int, random_state is the seed used by the random number generator. If the value is a RandomState instance, then it will be used as the random number generator. If the value is None, the random number generator is the RandomState instance used by np.random. verbose (bool) – initialization np.ndarray
openTSNE.initialization.random(n_samples, n_components=2, random_state=None, verbose=False)[source]

Initialize an embedding using samples from an isotropic Gaussian.

Parameters: n_samples (Union[int, np.ndarray]) – The number of samples. Also accepts a data matrix. n_components (int) – The dimension of the embedding space. random_state (Union[int, RandomState]) – If the value is an int, random_state is the seed used by the random number generator. If the value is a RandomState instance, then it will be used as the random number generator. If the value is None, the random number generator is the RandomState instance used by np.random. verbose (bool) – initialization np.ndarray