diff --git a/src/snap/Data.java b/src/snap/Data.java index f2e1d64..63fafbf 100644 --- a/src/snap/Data.java +++ b/src/snap/Data.java @@ -510,7 +510,7 @@ public double getProportionZeros() { int w = getPatternWeight(i); for (int j = 0; j < p.length; j++) { oneCount += w * p[j]; - zeroCount += w * (n[j] - p[j]); + zeroCount += w * (n[j] - 1 - p[j]); } } return (double) zeroCount / ((double) zeroCount + oneCount); diff --git a/src/snap/likelihood/BetaApproximationLikelihood.java b/src/snap/likelihood/BetaApproximationLikelihood.java index 215f1a5..1116e6e 100644 --- a/src/snap/likelihood/BetaApproximationLikelihood.java +++ b/src/snap/likelihood/BetaApproximationLikelihood.java @@ -22,7 +22,11 @@ public class BetaApproximationLikelihood extends GenericTreeLikelihood { Tree tree; +<<<<<<< HEAD Double rootAlpha; //Parameter for root distribution. +======= + Double rootTheta; //Parameter for root distribution. +>>>>>>> 998524460c43138ca5124e4ba57b30d99803bf95 Data data; int nPoints; //Size of mesh used in integration @@ -62,6 +66,10 @@ public void initAndValidate() throws Exception { nPoints = 20; //TODO: read this from the xml int nNodes = tree.getNodeCount(); partialIntegral = new double[nPoints][nNodes]; +<<<<<<< HEAD +======= + rootTheta = 0.5; //We should get this from the PARAMETERS. +>>>>>>> 998524460c43138ca5124e4ba57b30d99803bf95 hasDirt = Tree.IS_FILTHY; } @@ -231,7 +239,11 @@ private double transProb(double x,double y, double t) { } private double rootProb(double x) { +<<<<<<< HEAD return betaDensity(x,rootAlpha,rootAlpha); +======= + return betaDensity(x,rootTheta,rootTheta); +>>>>>>> 998524460c43138ca5124e4ba57b30d99803bf95 }