类 BallTree


  • public class BallTree
    extends java.lang.Object
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static int numSkipped  
    • 构造器概要

      构造器 
      限定符 构造器 说明
      protected BallTree​(java.util.List<Event> data, int minParent)
      Creates a Ball Tree (k-d tree) for the data to reduce the speed of the log probability computation.
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      protected static double computeLogKernel​(double[] y, double[] s, double h)  
      protected static double computeLogKernel​(double[] y, double[] s, double hMax, double hMin)
      The actual math for computing the log probability contribution for point y from point s.
      protected static java.util.List<java.lang.Double> computeLogKernel​(double[] y, java.util.List<Event> samples)  
      protected java.util.List<java.lang.Double> logPdfRecurse​(Event e)
      Computing the log probability in a recursive way on the tree.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • numSkipped

        public static int numSkipped
    • 构造器详细资料

      • BallTree

        protected BallTree​(java.util.List<Event> data,
                           int minParent)
        Creates a Ball Tree (k-d tree) for the data to reduce the speed of the log probability computation. See: http://www.datalab.uci.edu/papers/kernel_KDD2014.pdf
        参数:
        data - - The data to create the BallTree for
        minParent - - Minimum number of nodes in the area to split to split a region to sub regions.
    • 方法详细资料

      • logPdfRecurse

        protected java.util.List<java.lang.Double> logPdfRecurse​(Event e)
        Computing the log probability in a recursive way on the tree. We return a list here and not the actual number so we can use the logSumExp trick (Link: ??) to avoid underflow.
        参数:
        e - - Event to estimate the log probability for
        返回:
        list of all log probabilities that were computed.
      • computeLogKernel

        protected static java.util.List<java.lang.Double> computeLogKernel​(double[] y,
                                                                           java.util.List<Event> samples)
      • computeLogKernel

        protected static double computeLogKernel​(double[] y,
                                                 double[] s,
                                                 double h)
      • computeLogKernel

        protected static double computeLogKernel​(double[] y,
                                                 double[] s,
                                                 double hMax,
                                                 double hMin)
        The actual math for computing the log probability contribution for point y from point s.
        参数:
        y - - The point we estimate for.
        s - - Observed point in the model
        hMax - - The maximum bandwidth in this region
        hMin - - The minimum bandwidth in this region
        返回:
        log probability contribution of 's' to 'y'.