GREEDYAPPX

Kernel greedy data approximation.



 Synopsis:
  [Sel_inx,Alpha,Z,Kercnt,MsErrors,MaxErrors] = ...
     greedyappx(X,Ker,Arg,M,P,MsErr,Maxerr,Verb) 

 Description:
  The input column vectors are assumed to be represented
  in a kernel feature space given by (ker,arg) (see help kernel).
  This function aims to select a subset X(:,Sel_inx) such
  that linear span of X(:,Sel_inx) in the feature space 
  approximates well the linear span of X in the feature space.
  The vectors are selected such that the mean square reconstruction
  error in the feature space (the same objective as has Kernel PCA) 
  is minimized by greedy algorithm. The algorithm selects vectors
  until on of the following stopping  conditions is achieved:
    - number of vectors achieves m 
    - maximal reconstruction error drops below maxerr 
    - mean squared sum of reconstruction errors less than mserr. 
  
  The images of X(:,Inx_sel) in the features form a basis.
  The projection of input vector x into the basis is done by
     z = Alpha*kernel(x,X(:,Sel_inx),Ker,Arg)

  For more info refer to V.Franc: Optimization Algorithms for Kernel 
  Methods. Research report. CTU-CMP-2005-22. CTU FEL Prague. 2005.
  ftp://cmp.felk.cvut.cz/pub/cmp/articles/franc/Franc-PhD.pdf .

 Input:
  X [Dim x Num_data] Input data.
  Ker [string] Kernel identifier. See help of KERNEL for more info.
  Arg [...] Argument of selected kernel.
  M [1x1] Maximal number of vector used for approximation.
  P [1x1] Depth of search for each basis vector.
  MsErr [1x1] Desired mean sum of squared reconstruction errors.
  MaxErr [1x1] Desired maximal reconstruction error.
  Verb [1x1] If 1 then infor about process is displayed.

 Output:
  Sel_inx [1 x M] Indices of selected vector, i.e., S = X(:,Sel_inx).
  Alpha [M x M] Defines projection into the found basis (see above).
  Z [M x Num_data] Training data projected into the found basis.
  Kercnt [1 x 1] Number of used kernel evaluations.
  MsErrors [1 x M] Mean square reconstruction error wrt to selected 
   basis vectors. MsErr(end) is the resulting error.
  MaxErrors [1 x M] Maximal squared reconstruction error (of the worst
   input example) wrt. selcetd basis vectors.

 Example:
  type greedykpca

 See also
  GREEDYKPCA.


Source: greedyappx.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:
09-sep-2005, VF
12-feb-2005, VF, New help made
10-dec-2004, VF, tmp(find(Errors<=0)) = -inf; added to evoid num errors.
5-may-2004, VF
13-mar-2004, VF
10-mar-2004, VF
9-mar-2004, addopted from greedyappx