Dear ltilib developer,
I have some important issues to the kernelPCA functor :
1) kernel Computation and centering would ideally fit
into the kernelFunctor<T> functor. There these function
could be easily used by a lot of kernel functors (e.g.
my forthcomming kernelCanonicalCorrelation :-) )
2) The kernel PCA could be solved by a
symmetricalEigenSystem which schould be faster than a
normal one. Also since there exist a
UnifiedSymmetricalEigenSystem, this should be used so
that the user of KPCA doesn't have to care about the
right choice of an eigen System
3) IMPORTANT : To check if the eigenvalues are to small
to be handled, one should test against sqrt(eps) and
not against eps since later the roots of the
eigenvalues are used. I have had some serious problem
before changing this lokally
4) The system with autoDim and resultDim is confusing
and not very easy to use. Proposed solution :
* remove autoDim
* resultDim < 0 : calculate all Dimensions
* resultDim = 0 : calculate all Dimensions with
eigenvalues>sqrt(eps)
* resultDim > 0 : calculate
min(resultDim,maximumDimensions) Dimensions
* Default : -1 !!
I strongly propose to set the default value to -1. Only
when kernelPCA is used for visualisation, a default
value of 3 could be nice. But in all other
applications, the user himself should care how many
dimensions he wants to use with his results.
5) As mentioned before change kernelPCA to a template
and rename the file
I have joined the source code with detailed
descriptions (sorry, only in german) on the appropriate
positions in the code. Grep for PETER to find all
things I've mentioned
Best Regards,
Michael
P.S. If you like, I could make the corrections for you
so you only have to check them in.
Logged In: NO
Ups, nearly forgotten :
Also the relevance parameter seems to me a bit confusing. At
least from the documentation nobody could guess that the
relevance paramter is used to determine the results of
autoDim=true and there is no default parameter given as well.
I propose to leave out the relevance parameter and define
autoDim = true / resultDim=0 to return all eigenvectors with
eigenvalues which are not "zero"/ smaller than sqrt(eps).
Every further reduction should be manually performed by the
user himself.
[1] gives in formula formula to solve the same problems
forthe cca by determining p, so that
sum_{i=p+1}^{n}(\sigma_i) <= eps < sum_{i=p}^{n}(\sigma_i)
Michael
P.S. forgot to add the file, will send the file per mail to
Peter
--------
[1] Bjrck & Golub, Numerical Methods for Computing Angles
Between linearSubspaces, Mathematics of Computation 27
(123), 1973.