Documentation of 'org.ddogleg.nn.alg.AxisSplitterMedian' Java class
AxisSplitterMedian
org.ddogleg.nn.alg

Class AxisSplitterMedian<D>

  • All Implemented Interfaces:
    AxisSplitter<D>


    public class AxisSplitterMedian<D>
    extends java.lang.Object
    implements AxisSplitter<D>
    Splits the points in K-D Tree node by selecting the axis with the largest variance. The point with the median value along that axis is the split point. The data is segmented into left and right lists using the sorted list used to find the median value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getSplitAxis()
      The axis/dimension that the input list was split on
      D getSplitData()
      Data associated with the split point
      double[] getSplitPoint()
      Returns the point used to split the data
      void setDimension(int N) 
      void splitData(java.util.List<double[]> points, java.util.List<D> data, java.util.List<double[]> left, java.util.List<D> leftData, java.util.List<double[]> right, java.util.List<D> rightData)
      Given the a set of points, select the axis to split the data along and select a point to divide the data.
      • Methods inherited from class java.lang.Object

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

      • AxisSplitterMedian

        public AxisSplitterMedian(AxisSplitRule splitRule)
      • AxisSplitterMedian

        public AxisSplitterMedian()
        Defaults to selecting the split axis with maximum variance
    • Method Detail

      • splitData

        public void splitData(java.util.List<double[]> points,
                              java.util.List<D> data,
                              java.util.List<double[]> left,
                              java.util.List<D> leftData,
                              java.util.List<double[]> right,
                              java.util.List<D> rightData)
        Description copied from interface: AxisSplitter
        Given the a set of points, select the axis to split the data along and select a point to divide the data. Points whput items below the threshold into left and above into right. Data is optional and should be ignored if null. The selected
        Specified by:
        splitData in interface AxisSplitter<D>
        Parameters:
        points - Input: Set of points.
        data - Input: (Optional) Set of data associated with the points. Can be null.
        left - Output: Storage for points less than the split point.
        leftData - Output: (Optional) Storage for data associated with left. Can be null.
        right - Output: Storage for points more than the split point.
        rightData - Output: (Optional) Storage for data associated with right. Can be null.
      • getSplitPoint

        public double[] getSplitPoint()
        Description copied from interface: AxisSplitter
        Returns the point used to split the data
        Specified by:
        getSplitPoint in interface AxisSplitter<D>
      • getSplitAxis

        public int getSplitAxis()
        Description copied from interface: AxisSplitter
        The axis/dimension that the input list was split on
        Specified by:
        getSplitAxis in interface AxisSplitter<D>
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.