Class MedianDistanceFromArbitraryPoint

  • All Implemented Interfaces:
    java.io.Serializable, OptionHandler, RevisionHandler, TechnicalInformationHandler

    public class MedianDistanceFromArbitraryPoint
    extends BallSplitter
    implements TechnicalInformationHandler
    Class that splits a BallNode of a ball tree using Uhlmann's described method.

    For information see:

    Jeffrey K. Uhlmann (1991). Satisfying general proximity/similarity queries with metric trees. Information Processing Letters. 40(4):175-179.

    Ashraf Masood Kibriya (2007). Fast Algorithms for Nearest Neighbour Search. Hamilton, New Zealand.

    BibTeX:

     @article{Uhlmann1991,
        author = {Jeffrey K. Uhlmann},
        journal = {Information Processing Letters},
        month = {November},
        number = {4},
        pages = {175-179},
        title = {Satisfying general proximity/similarity queries with metric trees},
        volume = {40},
        year = {1991}
     }
     
     @mastersthesis{Kibriya2007,
        address = {Hamilton, New Zealand},
        author = {Ashraf Masood Kibriya},
        school = {Department of Computer Science, School of Computing and Mathematical Sciences, University of Waikato},
        title = {Fast Algorithms for Nearest Neighbour Search},
        year = {2007}
     }
     

    Valid options are:

     -S <num>
      The seed value for the random number generator.
      (default: 17)
    Version:
    $Revision: 1.2 $
    Author:
    Ashraf M. Kibriya (amk14[at-the-rate]cs[dot]waikato[dot]ac[dot]nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • MedianDistanceFromArbitraryPoint

        public MedianDistanceFromArbitraryPoint()
        Constructor.
      • MedianDistanceFromArbitraryPoint

        public MedianDistanceFromArbitraryPoint​(int[] instList,
                                                Instances insts,
                                                EuclideanDistance e)
        Constructor.
        Parameters:
        instList - The master index array.
        insts - The instances on which the tree is (or is to be) built.
        e - The Euclidean distance function to use for splitting.
    • Method Detail

      • globalInfo

        public java.lang.String globalInfo()
        Returns a string describing this nearest neighbour search algorithm.
        Returns:
        a description of the algorithm for displaying in the explorer/experimenter gui
      • getTechnicalInformation

        public TechnicalInformation getTechnicalInformation()
        Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
        Specified by:
        getTechnicalInformation in interface TechnicalInformationHandler
        Returns:
        the technical information about this class
      • listOptions

        public java.util.Enumeration listOptions()
        Returns an enumeration describing the available options.
        Specified by:
        listOptions in interface OptionHandler
        Overrides:
        listOptions in class BallSplitter
        Returns:
        an enumeration of all the available options.
      • setOptions

        public void setOptions​(java.lang.String[] options)
                        throws java.lang.Exception
        Parses a given list of options. Valid options are:

         -S <num>
          The seed value for the random number generator.
          (default: 17)
        Specified by:
        setOptions in interface OptionHandler
        Overrides:
        setOptions in class BallSplitter
        Parameters:
        options - the list of options as an array of strings
        Throws:
        java.lang.Exception - if an option is not supported
      • getOptions

        public java.lang.String[] getOptions()
        Gets the current settings of the object.
        Specified by:
        getOptions in interface OptionHandler
        Overrides:
        getOptions in class BallSplitter
        Returns:
        an array of strings suitable for passing to setOptions
      • setRandomSeed

        public void setRandomSeed​(int seed)
        Sets the seed for random number generator.
        Parameters:
        seed - The seed value to set.
      • getRandomSeed

        public int getRandomSeed()
        Returns the seed value of random number generator.
        Returns:
        The random seed currently in use.
      • randomSeedTipText

        public java.lang.String randomSeedTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui.
      • splitNode

        public void splitNode​(BallNode node,
                              int numNodesCreated)
                       throws java.lang.Exception
        Splits a ball into two.
        Specified by:
        splitNode in class BallSplitter
        Parameters:
        node - The node to split.
        numNodesCreated - The number of nodes that so far have been created for the tree, so that the newly created nodes are assigned correct/meaningful node numbers/ids.
        Throws:
        java.lang.Exception - If there is some problem in splitting the given node.