Open karlnapf opened 11 years ago
Can you explain what you mean by "strange things".
The integration test recently failed. preprocessor_kernelpca_modular in python modular This means that the projection changed from when the test was created. Unfortunately, the example does not use sensible data which a human could check visually. I recently created such an example and noticed that the projection did not look as I expected it to. Since I was in a hurry, I investigated no further.
If you could write a simple but meaningful example in python that demonstrates that KPCA works as it should, we could update the old integration test. More importantly, if you could write a unit test for KPCA which for example checks the projection of a small toy example to be correct, this would be even better.
. we have to implement the kernel pca algorithm in python without using the shogun libraries rite?
No, no.
1.) Create an example for kernelPCA which illustrates the algorithm on meaningful data. This means one should see (if plotted) what the method does. If this is reasonable, the integration test should be updated (ask for that its easy). Challenge here is to create a nice example since for this you have to somehow understand kernel PCA
2.) Create a unit test in c++. This means you should create a simple test case for which you can compute the results somehow else (best is another implementation which you trust, or derived by hand even better). Then assert the results of shogun's kernel PCA against this reference.
so we just need to make a test sample?could you explain the integration test?
don't worry about the integration test for now. It is just this: Once the test works, make sure it is reproducible, then save results to a file (we have a script for this), then everytime the example is run, it is checked that the results match with those in the file. But this all comes after the example works.
I have implemented the KPCA algorithim in python and it is giving me good results. https://github.com/deerishi/KernelPCA-test-check/commit/743d3d9bc373aa36b0ea4bb7065ed36ba8706a93
Kernel PCA seems to do strange things, in this easy task you could
Create meaningful data for kPCA for python example compare against other implementation with same data/parameters in unit-test, update integration test (easy)
If anything is unclear, ask!