This repository contains the works related to the implementation of a generalization of principal component analysis and its kernel version. The Generalized PCA aims at maximizing the sum of an arbitrary convex function of principal components, the current solution is a gradient ascent approach.
The findings of this work have been published by IEEE. The whole algorithm is explained in depth in the article, with a compelling mathematical derivation and clear results.
If you need anymore details, there are also my thesis that extend the article: PoliTo thesis and UIC thesis.
The original code was written for Matlab, it had been cleaned up and generalized neatly in two python classes.
The files are as follows:
-
README.md: this file
-
LICENSE: license file
-
execute.py: a toy example of the GPCA usage (taken from this)
-
GPCA.py: generalized principal component analysis code
-
GKPCA.py: generalized kernel principal component analysis code
The classes try to follow the sklearn.decomposition.PCA and sklearn.decomposition.KernelPCA respectively, so use them as such.
This repository is licensed under the MIT License. Feel free to use the code and materials for academic and non-commercial purposes.