KPCA

Kernel Principal Component Analysis.


  
 Synopsis:
  model = kpca(X)
  model = kpca(X,options)

 Description:
  This function is implementation of Kernel Principal Component 
  Analysis (KPCA) [Schol98b]. The input data X are non-linearly
  mapped to a new high dimensional space induced by prescribed
  kernel function. The PCA is applied on the non-linearly mapped 
  data. The result is a model describing non-linear data projection.
  See 'help kernelproj' for info how to project data.

 Input:
  X [dim x num_data] Training data.
  
  options [struct] Decribes kernel and output dimension:
   .ker [string] Kernel identifier (see 'help kernel'); 
     (default 'linear').
   .arg [1 x narg] kernel argument; (default 1).
   .new_dim [1x1] Output dimension (number of used principal 
     components); (default num_data).

 Output:
  model [struct] Kernel projection:
   .Alpha [num_data x new_dim] Multipliers.
   .b [new_dim x 1] Bias.
   .sv.X [dim x num_data] Training vectors.
  
   .nsv [1x1] Number of training data.
   .eigval [1 x num_data] Eigenvalues of centered kernel matrix.
   .mse [1x1] Mean square representation error of maped data.
   .MsErr [dim x 1] MSE with respect to used basis vectors;
      mse=MsErr(new_dim).
   .kercnt [1x1] Number of used kernel evaluations.
   .options [struct] Copy of used options.
   .cputime [1x1] CPU time used for training.

 Example:
  X = gencircledata([1;1],5,250,1);
  model = kpca( X, struct('ker','rbf','arg',4,'new_dim',2));
  XR = kpcarec( X, model );
  figure; 
  ppatterns( X ); ppatterns( XR, '+r' );
  
 See also
  KERNELPROJPCAGDA.
   

Source: kpca.m

About: Statistical Pattern Recognition Toolbox
(C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
Czech Technical University Prague
Faculty of Electrical Engineering
Center for Machine Perception

Modifications:
2-jun-2008, VF, default new_dim changed to num_data; suggested by Claudio Lopez
4-may-2004, VF
10-july-2003, VF, computation of kercnt added
22-jan-2003, VF
11-july-2002, VF, mistake "Jt=zeros(N,L)/N" repared
(reported by SH_Srinivasan@Satyam.com).
5-July-2001, V.Franc, comments changed
20-dec-2000, V.Franc, algorithm was implemented