GREEDYAPPX | ![]() |
Kernel greedy data approximation.
Synopsis:
[inx,Alpha,kercnt,mserr,maxerr]=...
greedyappx(X,ker,arg,m,m2,mserr,maxerr,verb)
Description:
This function aims to select a subset S of input data X such
that the feature space representation of X can be well
approximated by feature space representation of S.
The feature represenation of data is by the use of
specified kernel function.
The greedy algortihm is used to seletect the subset S.
The algorithm iterates until on of the following stopping
conditions is achieved:
- number of vectors of S achieves m
- maximal reconstruction error is less than maxerr
- mean squared sum of reconstruction errors less than mserr.
Input:
X [dim x num_data] Input data.
ker [string] Kernel identifier. See 'help kernel' for more info.
arg [...] Argument of selected kernel.
m [1x1] Maximal number of vector used for approximation.
p [1x1] Depth of search for the best 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:
inx [1 x n] Indices of selected vector, i.e., S = X(:,inx).
Alpha [m x m] Koefficient of the kernel projection of data on the
found base vectors, i.e., z = Alpha*kernel(S,x,ker,arg).
Z [m x num_data] Training data projected on the found base vectors.
kercnt [1x1] Number of used kernel evaluations.
MsErr [1 x m] Sum of squared reconstruction errors for corresponding
number of base vectors.
MaxErr [1 x m] Maximal squared reconstruction error for crresponding
See also
GREEDYKPCA.
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:
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