class_docstr: RBF Kernel Principal Component Analysis for dimensionality reduction.
  
  Parameters
  ----------
  gamma : float (default: 15.0)
      Free parameter (coefficient) of the RBF kernel.
  n_components : int (default: None)
      The number of principal components for transformation.
      Keeps the original dimensions of the dataset if `None`.
  copy_X : bool (default: True)
      Copies training data, which is required to compute the projection
      of new data via the transform method. Uses a reference to X if False.
  
  Attributes
  ----------
  e_vals_ : array-like, shape=[n_features]
      Eigenvalues in sorted order.
  e_vecs_ : array-like, shape=[n_features]
     Eigenvectors in sorted order.
  X_projected_ : array-like, shape=[n_samples, n_components]
     Training samples projected along the component axes.
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/feature_extraction/RBFKernelPCA/
class_docstr_tok: ["RBF","Kernel","Principal","Component","Analysis","for","dimensionality","reduction",".","Parameters","--","--","--","--","--","gamma",":","float","(","default",":","15.0",")","Free","parameter","(","coefficient",")","of","the","RBF","kernel",".","n_components",":","int","(","default",":","None",")","The","number","of","principal","components","for","transformation",".","Keeps","the","original","dimensions","of","the","dataset","if","`","None","`",".","copy_X",":","bool","(","default",":","True",")","Copies","training","data",",","which","is","required","to","compute","the","projection","of","new","data","via","the","transform","method",".","Uses","a","reference","to","X","if","False",".","Attributes","--","--","--","--","--","e_vals_",":","array-like",",","shape=","[","n_features","]","Eigenvalues","in","sorted","order",".","e_vecs_",":","array-like",",","shape=","[","n_features","]","Eigenvectors","in","sorted","order",".","X_projected_",":","array-like",",","shape=","[","n_samples",",","n_components","]","Training","samples","projected","along","the","component","axes",".","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/feature_extraction\/RBFKernelPCA\/"]
docstr: Apply the non-linear transformation on X.
  
  Parameters
  ----------
  X : {array-like, sparse matrix}, shape = [n_samples, n_features]
      Training vectors, where n_samples is the number of samples and
      n_features is the number of features.
  
  Returns
  -------
  X_projected : np.ndarray, shape = [n_samples, n_components]
      Projected training vectors.
docstr_tok: ["Apply","the","non-linear","transformation","on","X.","Parameters","--","--","--","--","--","X",":","{","array-like",",","sparse","matrix","}",",","shape","=","[","n_samples",",","n_features","]","Training","vectors",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","Returns","--","--","--","-","X_projected",":","np.ndarray",",","shape","=","[","n_samples",",","n_components","]","Projected","training","vectors","."]
code: def transform(self, X):
      """Apply the non-linear transformation on X.
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape = [n_samples, n_features]
          Training vectors, where n_samples is the number of samples and
          n_features is the number of features.
  
      Returns
      -------
      X_projected : np.ndarray, shape = [n_samples, n_components]
          Projected training vectors.
  
      """
      if not hasattr(self, "X_"):
          raise AttributeError("Object as not been fitted, yet.")
      self._check_arrays(X=X)
      # pair_dist = np.array([np.sum((X - row)**2) for row in self.X_])
      pair_dist = np.ones((self.X_.shape[0], X.shape[0]))
      for idx in range(X.shape[0]):
          pair_dist[:, idx] = ((self.X_ - X[idx]) ** 2).sum(axis=1)
  
      K = np.exp((-1) * self.gamma * pair_dist)
      e_vecs = self._projection_matrix(
          eig_vecs=self.e_vecs_, n_components=self.n_components
      )
      return K.T.dot(e_vecs / self.e_vals_[: e_vecs.shape[1]])
  
file_path: mlxtend/mlxtend/feature_extraction/rbf_kernel_pca.py
imports: import numpy
  from scipy.spatial import distance
  from .._base import _BaseModel
label_desc: Use image node_id 4 for calling the RBFKernelPCA obj's underlying member method code with example usage: obj.transform(X) and returns: K