-
Notifications
You must be signed in to change notification settings - Fork 174
Description
I think it is worth considering adding support for weighted PCA and ICA/tICA in ProDy.
The former should be fairly easy, since it already exists to an extent in the current PCA class already:
https://github.com/prody/ProDy/blob/master/prody/dynamics/pca.py#L180
but only when the input data is an Ensemble class with weights. A similar treatment should be added to
https://github.com/prody/ProDy/blob/master/prody/dynamics/pca.py#L166
So that one can pass a weight vector (for each sample) or matrix (for each sample and atom) as a parameter to PCA.buildCovariance.
ICA is trickier to implement, but the covariance matrix is the same. Only the decomposition part is different. A good formula to follow is probably from scikit learn: https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html