[mlpack] Rotate new data with Kernel PCA

dslate at speakeasy.net dslate at speakeasy.net
Wed Apr 2 18:45:38 EDT 2014


Hi,

I am quite experienced with predictive analytics and machine learning, but
I'm a newbie to mlpack and this mailing list, so please forgive me if I'm
not posting my question to the right place. 

I would like to call mlpack's kpca::KernelPCA facility from a C++ program
to perform kernel PCA analysis on the feature matrix for some "training"
data for the purposes of dimensionality reduction, and then apply the
resulting rotation on some new "test" data.  I've done this kind of thing
with regular (linear) PCA in R, OpenCV, etc., using a "predict" or
"project" method, but I have been unable to figure out how to do the
equivalent operation using mlpack, and I can't seem to find any examples
of this.  The documentation of the various versions of the Apply method
seem to all involve doing the KernelPCA analysis on some data, and then
transforming the same data, but I see no way to apply the results to new
data. 

Can anyone give an example of how to do this?

Thanks,

-- Dave Slate




More information about the mlpack mailing list