Skip to content

Commit

Permalink
supidly introduced bug after getting correct number..
Browse files Browse the repository at this point in the history
  • Loading branch information
xji3 committed Nov 21, 2023
1 parent 75001a6 commit e272842
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dr/evomodel/coalescent/smooth/SkyGlideLikelihood.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public double[] getGradientWrtLogPopulationSize() {
currentGridIndex = lastGridIndex;
}
}
// updateSingleTreePopulationInverseGradientWrtLogPopSize(index, gradient);
updateSingleTreePopulationInverseGradientWrtLogPopSize(index, gradient);
}

return gradient;
Expand Down Expand Up @@ -198,7 +198,7 @@ public double getSingleTreeLogLikelihood(int index) {
lnL -= 0.5 * lineageCount * (lineageCount - 1) * sum;
}
}
// lnL += getSingleTreePopulationInverseLogLikelihood(index);
lnL += getSingleTreePopulationInverseLogLikelihood(index);
return lnL;
}

Expand Down Expand Up @@ -328,7 +328,7 @@ private void updateGridInterceptDerivativeWrtLogPopSize(int gridIndex, double[]
final double lastGridTime = gridPointParameter.getParameterValue(gridIndex - 1);

final double firstDerivative = thisGridTime / (thisGridTime - lastGridTime) * multiplier;
final double secondDerivative = -thisGridTime / (thisGridTime - lastGridTime) * multiplier;
final double secondDerivative = -lastGridTime / (thisGridTime - lastGridTime) * multiplier;

// if (logPopSizeParameter.getParameterValue(gridIndex) == logPopSizeParameter.getParameterValue(gridIndex + 1)) {
// gradient[gridIndex] += (firstDerivative + secondDerivative) / 2;
Expand Down

0 comments on commit e272842

Please sign in to comment.