Class RelativeEntropyKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Double relativeEntropy(DoubleArray p1, DoubleArray p2) Returns the relative entropy (aka Kullback-Leibler divergence) of two vectors.
      final static Double empiricalRelativeEntropy(DoubleArray p1, DoubleArray p2) Returns the empirical relative entropy using trace data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • relativeEntropy

         final static Double relativeEntropy(DoubleArray p1, DoubleArray p2)

        Returns the relative entropy (aka Kullback-Leibler divergence) of two vectors.

        Parameters:
        p1 - The first vector
        p2 - The second vector
        Returns:

        The relative entropy calculated as sum(p1_i * |log(p1_i/p2_i)|)

      • empiricalRelativeEntropy

         final static Double empiricalRelativeEntropy(DoubleArray p1, DoubleArray p2)

        Returns the empirical relative entropy using trace data.

        Parameters:
        p1 - The first vector (from empirical data)
        p2 - The second vector (from model)
        Returns:

        The relative entropy