All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.core.neighboursearch.balltrees.MedianDistanceFromArbitraryPoint Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This version represents the developer version, the "bleeding edge" of development, you could say. New functionality gets added to this version.

There is a newer version: 3.9.6
Show newest version
/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see .
 */

/*
 * MedianDistanceFromArbitraryPoint.java
 * Copyright (C) 2007-2012 University of Waikato, Hamilton, New Zealand
 */

package weka.core.neighboursearch.balltrees;

import java.util.Collections;
import java.util.Enumeration;
import java.util.Random;
import java.util.Vector;

import weka.core.EuclideanDistance;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Option;
import weka.core.RevisionUtils;
import weka.core.TechnicalInformation;
import weka.core.TechnicalInformation.Field;
import weka.core.TechnicalInformation.Type;
import weka.core.TechnicalInformationHandler;
import weka.core.Utils;

/**
 *  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)
 * 
* * * * @author Ashraf M. Kibriya (amk14[at-the-rate]cs[dot]waikato[dot]ac[dot]nz) * @version $Revision: 10203 $ */ public class MedianDistanceFromArbitraryPoint extends BallSplitter implements TechnicalInformationHandler { /** for serialization. */ private static final long serialVersionUID = 5617378551363700558L; /** Seed for random number generator. */ protected int m_RandSeed = 17; /** * Random number generator for selecting an abitrary (random) point. */ protected Random m_Rand; /** Constructor. */ public MedianDistanceFromArbitraryPoint() { } /** * Constructor. * * @param instList The master index array. * @param insts The instances on which the tree is (or is to be) built. * @param e The Euclidean distance function to use for splitting. */ public MedianDistanceFromArbitraryPoint(int[] instList, Instances insts, EuclideanDistance e) { super(instList, insts, e); } /** * Returns a string describing this nearest neighbour search algorithm. * * @return a description of the algorithm for displaying in the * explorer/experimenter gui */ public String globalInfo() { return "Class that splits a BallNode of a ball tree using Uhlmann's " + "described method.\n\n" + "For information see:\n\n" + getTechnicalInformation().toString(); } /** * 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. * * @return the technical information about this class */ @Override public TechnicalInformation getTechnicalInformation() { TechnicalInformation result; TechnicalInformation additional; result = new TechnicalInformation(Type.ARTICLE); result.setValue(Field.AUTHOR, "Jeffrey K. Uhlmann"); result.setValue(Field.TITLE, "Satisfying general proximity/similarity queries with metric trees"); result.setValue(Field.JOURNAL, "Information Processing Letters"); result.setValue(Field.MONTH, "November"); result.setValue(Field.YEAR, "1991"); result.setValue(Field.NUMBER, "4"); result.setValue(Field.VOLUME, "40"); result.setValue(Field.PAGES, "175-179"); additional = result.add(Type.MASTERSTHESIS); additional.setValue(Field.AUTHOR, "Ashraf Masood Kibriya"); additional.setValue(Field.TITLE, "Fast Algorithms for Nearest Neighbour Search"); additional.setValue(Field.YEAR, "2007"); additional .setValue( Field.SCHOOL, "Department of Computer Science, School of Computing and Mathematical Sciences, University of Waikato"); additional.setValue(Field.ADDRESS, "Hamilton, New Zealand"); return result; } /** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration




© 2015 - 2024 Weber Informatics LLC | Privacy Policy