Dear community,
I don't understand why the processing time of those two sample codes is too different from each other.
PointDistributionModel[_3D, TriangleMesh]= {
val gpSSM: LowRankGaussianProcess[_3D, EuclideanVector[_3D]] = pcaModel.gp.interpolate(TriangleMeshInterpolator3D()
val covSSM: MatrixValuedPDKernel[_3D] = gpSSM.cov
val augmentedCov: MatrixValuedPDKernel[_3D] = covSSM + genericKernel
val augmentedGP = GaussianProcess(gpSSM.mean, augmentedCov)
val lowRankAugmentedGP: LowRankGaussianProcess[_3D, EuclideanVector[_3D]] = LowRankGaussianProcess.approximateGPCholesky(
referenceMesh,
augmentedGP,
relativeTolerance = 0.01,
interpolator = TriangleMeshInterpolator3D[EuclideanVector[_3D]]()
)
val augmentedPDM = PointDistributionModel(pcaModel.reference, lowRankAugmentedGP)
augmentedPDM
}
// Fast codes (20 x faster that above)
// val gp is a simple diagonal kernel GP
val biasModel: LowRankGaussianProcess[_3D, EuclideanVector[_3D]] = LowRankGaussianProcess.approximateGPCholesky(
referenceMesh,
gp,
relativeTolerance = 0.01,
interpolator = TriangleMeshInterpolator3D[EuclideanVector[_3D]]()
)
val augmentedPDM = PointDistributionModel.augmentModel(pcaModel, biasModel)
Here, pcaModel is a model from data.
The main difference I see here is that in first place, the lowRankProcess is computed with the augmented GP while for the second case, only the diagonal GP is used.
Thank you very much,
Best regards,
Maia