code: def pca(
      X,
      n_components=2,
      svd_solver="auto",
      random_state=None,
      verbose=False,
      add_jitter=True,
  ):
      """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
  
      add_jitter: bool
          If True, jitter with small standard deviation is added to the
          initialization to prevent points overlapping exactly, which may lead to
          numerical issues during optimization.
  
      Returns
      -------
      initialization: np.ndarray
  
      """
      timer = utils.Timer(
          "Calculating PCA-based initialization...", verbose
      )
      timer.__enter__()
  
      pca_ = PCA(
          n_components=n_components,
          svd_solver=svd_solver,
          random_state=random_state,
      )
      embedding = pca_.fit_transform(X)
  
      rescale(embedding, inplace=True)
      if add_jitter:
          jitter(embedding, inplace=True, random_state=random_state)
  
      timer.__exit__()
  
      return np.ascontiguousarray(embedding)
  
file_path: openTSNE/openTSNE/initialization.py
imports: import numpy
  import scipy.sparse
  from sklearn.decomposition import PCA
  from sklearn.utils import check_random_state
  from openTSNE import utils
label_desc: Use image node_id 4 for calling a global function with example usage: pca(X, n_components, svd_solver, random_state, verbose, add_jitter) and returns: np