Examples of logToLinear()


Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

                sim += wordSubClusterProbability(c2, word2);
                totalSim = logMath.addAsLinear(totalSim, sim);
                wordPairCount++;
            }
        }
        return totalSim - logMath.logToLinear(wordPairCount);
    }


    /**
     * Check whether these to clusters stand in a relation to each other. Two clusters are related if a member of one is
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

                if (node1.hasAncestralRelationship(node2))
                    return Double.NEGATIVE_INFINITY;

                double overlap = getOverlap(node1, node2);
                if (overlap > 0.0) {
                    overlap = logMath.logToLinear((float) overlap);
                    overlap += node1.getPosterior() + node2.getPosterior();
                    if (overlap > maxSim) {
                        maxSim = overlap;
                    }
                }
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

    double bPosterior = (pathABD + pathACBD) / allPaths;
    double cPosterior = (pathACBD + pathACD) / allPaths;

    double delta = 1e-4;
    Assert.assertEquals (logMath.logToLinear((float) a.getPosterior()), 1.0, delta);
    Assert.assertEquals (logMath.logToLinear((float) b.getPosterior()), bPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) c.getPosterior()), cPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) d.getPosterior()), 1.0, delta);
  }
}
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

    double bPosterior = (pathABD + pathACBD) / allPaths;
    double cPosterior = (pathACBD + pathACD) / allPaths;

    double delta = 1e-4;
    Assert.assertEquals (logMath.logToLinear((float) a.getPosterior()), 1.0, delta);
    Assert.assertEquals (logMath.logToLinear((float) b.getPosterior()), bPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) c.getPosterior()), cPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) d.getPosterior()), 1.0, delta);
  }
}
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

    double cPosterior = (pathACBD + pathACD) / allPaths;

    double delta = 1e-4;
    Assert.assertEquals (logMath.logToLinear((float) a.getPosterior()), 1.0, delta);
    Assert.assertEquals (logMath.logToLinear((float) b.getPosterior()), bPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) c.getPosterior()), cPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) d.getPosterior()), 1.0, delta);
  }
}
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.logToLinear()

    double delta = 1e-4;
    Assert.assertEquals (logMath.logToLinear((float) a.getPosterior()), 1.0, delta);
    Assert.assertEquals (logMath.logToLinear((float) b.getPosterior()), bPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) c.getPosterior()), cPosterior, delta);
    Assert.assertEquals (logMath.logToLinear((float) d.getPosterior()), 1.0, delta);
  }
}
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.