New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LowRankModelBuilder: PCA Basisvectors and values are not scaled correctly #242
Comments
Hi @marcelluethi, Best |
Hi Stefan, Thanks for investigating this. I just checked the code in the LowRankGPModelBuilder. |
Hi Marcel, not in all cases. For large number of coordinates, the nystroem approximation gets worse: |
For low number of coordinates, the approximation is excellent. I checked the covariance matrices from statismo against explicitly calculated ones in R using the same kernel. Here is an example using RvtkStatismo, where the nystroem approx is not too good: require(RvtkStatismo);require(Morpho);require(Rvcg)
data(humface)
kernel1 <- GaussianKernel(10,1)
hummodel <- statismoModelFromRepresenter(humface,kernel1,ncomp = 100,nystroem = 500)
## get vector norms
colSums(GetOrthonormalPCABasisMatrix(hummodel)^2) Vector norms: Example with only 1000 coordinates require(RvtkStatismo);require(Morpho);require(Rvcg)
data(humface)
kernel1 <- GaussianKernel(10,1)
hummodel <- statismoModelFromRepresenter(vert2points(humface)[1:1000,],kernel1,ncomp = 100,nystroem = 1000)
## get vector norms
colSums(GetOrthonormalPCABasisMatrix(hummodel)^2) Vector norms: |
Now I see what you mean. Maybe in this case it would be better to throw an exception, in order to make the user aware that the approximation is bad and he should use more points for the approximation (or assume greater smoothness). If the approximation is so bad, it is unlikely that the resulting model is useful. I guess in your example you would also get back an orthonormal matrix if you increase the smoothness (i.e. the sigma in the Gaussian kernel). |
I think an exception would be too harsh, as things escalate quite quickly :( |
You are right. It still enlarges the space of deformations that can be expressed. It is maybe just not a good approximation to the original kernel. Anyway, we are currently working on improving the approximation quality. We should soon have a better approximation method, which does not suffer from this problem. |
Awesome! |
In LowRankModelBuilder: PCA Basisvectors and values are not scaled correctly. The call
GetOrthonormalPCABasisMatrix
does not return an orthonormal matrix.The text was updated successfully, but these errors were encountered: