Skip to content

Commit

Permalink
Keep the original domain when creating a posterior PancakeDLRGP. (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-schneider authored and Ghazi-Bouabene committed Mar 28, 2018
1 parent 5d22eab commit 0dc84bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/scalismo/faces/momo/PancakeDLRGP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ case class PancakeDLRGP[D <: Dim: NDSpace, +DDomain <: DiscreteDomain[D], Value]
*
* @param sigma2 observation noise of sample, *additional* (independent) to model noise
*/
def posterior(trainingData: IndexedSeq[(PointId, Value)], sigma2: Double): PancakeDLRGP[D, DiscreteDomain[D], Value] = {
def posterior(trainingData: IndexedSeq[(PointId, Value)], sigma2: Double): PancakeDLRGP[D, DDomain, Value] = {
require(sigma2 >= 0.0)
val cov = MultivariateNormalDistribution(DenseVector.zeros[Double](outputDim), DenseMatrix.eye[Double](outputDim) *:* (sigma2 + totalNoiseVariance))
val newtd = trainingData.map { case (ptId, df) => (ptId, df, cov) }
Expand All @@ -188,7 +188,7 @@ case class PancakeDLRGP[D <: Dim: NDSpace, +DDomain <: DiscreteDomain[D], Value]
*
* @param trainingData list of point observations (PointId, Value, Uncertainty), uncertainty is *additional* (independent) to model noise
*/
def posterior(trainingData: IndexedSeq[(PointId, Value, MultivariateNormalDistribution)]): PancakeDLRGP[D, DiscreteDomain[D], Value] = {
def posterior(trainingData: IndexedSeq[(PointId, Value, MultivariateNormalDistribution)]): PancakeDLRGP[D, DDomain, Value] = {
def addMVN(mvn1: MultivariateNormalDistribution, mvn2: MultivariateNormalDistribution): MultivariateNormalDistribution = {
MultivariateNormalDistribution(mvn1.mean + mvn2.mean, mvn1.cov + mvn2.cov)
}
Expand Down

0 comments on commit 0dc84bd

Please sign in to comment.