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\/"]
code: def _kernel_matrix(self, X, gamma):
      # Calculating the squared Euclidean distances for every pair of points
      # in the MxN dimensional dataset.
      sq_dists = distance.pdist(X, "sqeuclidean")
  
      # Converting the pairwise distances into a symmetric MxM matrix.
      mat_sq_dists = distance.squareform(sq_dists)
  
      # Computing the MxM kernel matrix.
      K = np.exp((-1) * gamma * mat_sq_dists)
  
      # Centering the symmetric NxN kernel matrix.
      N = K.shape[0]
      one_n = np.ones((N, N)) / N
      K = K - one_n.dot(K) - K.dot(one_n) + one_n.dot(K).dot(one_n)
      return K
  
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 5 for calling the RBFKernelPCA obj's underlying member method code with example usage: obj._kernel_matrix(X, gamma) and returns: K