Examples of logValue()


Examples of cc.mallet.grmm.types.Factor.logValue()

        // for each assigment to the clique
        //  xxx SLOW this will need to be sparsified
        AssignmentIterator assnIt = clique.assignmentIterator ();
        int i = 0;
        while (assnIt.hasNext ()) {
          double marginal = Math.exp (ptl.logValue (assnIt) - logZ);
          expectations [tidx][i].plusEqualsSparse (clique.getFv (), marginal);
          if (defaultExpectations[tidx].location (i) != -1)
            defaultExpectations [tidx].incrementValue (i, marginal);
          assnIt.advance (); i++;
        }
View Full Code Here

Examples of cc.mallet.grmm.types.Factor.logValue()

          if (defaultExpectations[tidx].location (i) != -1)
            defaultExpectations [tidx].incrementValue (i, marginal);
          assnIt.advance (); i++;
        }

        value += (ptl.logValue (observations) - logZ);
      }
      return value;
    }

View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0;
        else
            if (x<0.0 || x>1.0)
                throw new ArithmeticException("x must be in [0,1]");

        final double result = Math.exp(gf.logValue(a+b) - gf.logValue(a) - gf.logValue(b) + a*Math.log(x) + b*Math.log(1.0-x));

        if (x < (a+1.0)/(a+b+2.0))
            return result * betaContinuedFraction(a, b, x, accuracy, maxIteration)/a;
        else
            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0;
        else
            if (x<0.0 || x>1.0)
                throw new ArithmeticException("x must be in [0,1]");

        final double result = Math.exp(gf.logValue(a+b) - gf.logValue(a) - gf.logValue(b) + a*Math.log(x) + b*Math.log(1.0-x));

        if (x < (a+1.0)/(a+b+2.0))
            return result * betaContinuedFraction(a, b, x, accuracy, maxIteration)/a;
        else
            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0;
        else
            if (x<0.0 || x>1.0)
                throw new ArithmeticException("x must be in [0,1]");

        final double result = Math.exp(gf.logValue(a+b) - gf.logValue(a) - gf.logValue(b) + a*Math.log(x) + b*Math.log(1.0-x));

        if (x < (a+1.0)/(a+b+2.0))
            return result * betaContinuedFraction(a, b, x, accuracy, maxIteration)/a;
        else
            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
    }

    static double betaFunction(final double z, final double w) {
        final GammaFunction gf = new GammaFunction();
        return Math.exp(gf.logValue(z)+gf.logValue(w)-gf.logValue(z+w));
    }
}
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
    }

    static double betaFunction(final double z, final double w) {
        final GammaFunction gf = new GammaFunction();
        return Math.exp(gf.logValue(z)+gf.logValue(w)-gf.logValue(z+w));
    }
}
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
    }

    static double betaFunction(final double z, final double w) {
        final GammaFunction gf = new GammaFunction();
        return Math.exp(gf.logValue(z)+gf.logValue(w)-gf.logValue(z+w));
    }
}
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0;
        else
            if (x<0.0 || x>1.0)
                throw new ArithmeticException("x must be in [0,1]");

        final double result = Math.exp(gf.logValue(a+b) - gf.logValue(a) - gf.logValue(b) + a*Math.log(x) + b*Math.log(1.0-x));

        if (x < (a+1.0)/(a+b+2.0))
            return result * betaContinuedFraction(a, b, x, accuracy, maxIteration)/a;
        else
            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
View Full Code Here

Examples of org.jquantlib.math.distributions.GammaFunction.logValue()

            return 1.0;
        else
            if (x<0.0 || x>1.0)
                throw new ArithmeticException("x must be in [0,1]");

        final double result = Math.exp(gf.logValue(a+b) - gf.logValue(a) - gf.logValue(b) + a*Math.log(x) + b*Math.log(1.0-x));

        if (x < (a+1.0)/(a+b+2.0))
            return result * betaContinuedFraction(a, b, x, accuracy, maxIteration)/a;
        else
            return 1.0 - result * betaContinuedFraction(b, a, 1.0-x, accuracy, maxIteration)/b;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.