Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed eigenvalue discrepancy in PCA/ActiveShapeModel. #114
PCA & ActiveShapeModel
Principal components (as the eigenvalues of the covariance matrix) are now correctly set as the square of singular values s_i of the data matrix divided by the number of samples minus 1.
In addition, pc scores are now formulated w.r.t. standard deviation (i.e. square root of eigenvalues) of their corresponding principal component. This was already implicitly the case, as the singular values haven't been squared in the first place.
The changed scaling of pc scores impacted the CONRADCardiacModel classes in the packages
Changes have been made to accommodate for the fact that weights are now formulated in terms of standard deviation instead of variance.
Heart Model Data
The Conrad Cardiac Model files provided at https://www5.cs.fau.de/en/conrad/data/heart-model/ will be updated shortly w.r.t. the above mentioned changes.
With the new behavior of PCA and ActiveShapeModel, PcaIO files written prior to this change are no longer compatible. Though still readible, the entries will be interpreted incorrectly.
PcaHotfixScript in the edu.stanford.rsl.aps.activeshapemodel package provides an easy way for users to update their ConradCardiacModel model files (.ccm) and score files (.ccs), as well as other PcaIO-written files.
This script updates the old eigenvalues (i.e. singular values) by computing the square and dividing by the number of samples -1.
If you encounter any problems with your existing files, please feel free to contact us.