public class BottomUpConstructor extends BallTreeConstructor implements TechnicalInformationHandler
@techreport{Omohundro1989, author = {Stephen M. Omohundro}, institution = {International Computer Science Institute}, month = {December}, number = {TR-89-063}, title = {Five Balltree Construction Algorithms}, year = {1989} }Valid options are:
-N <value> Set maximum number of instances in a leaf node (default: 40)
-R Set internal nodes' radius to the sum of the child balls radii. So that it contains the child balls.
Constructor and Description |
---|
BottomUpConstructor()
Creates a new instance of BottomUpConstructor.
|
Modifier and Type | Method and Description |
---|---|
int[] |
addInstance(BallNode node,
Instance inst)
Adds an instance to the ball tree.
|
BallNode |
buildTree()
Builds the ball tree bottom up.
|
Instance |
calcPivot(weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode node1,
weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode node2,
Instances insts)
Calculates the centroid pivot of a node based on its
two child nodes.
|
double |
calcRadius(weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode n1,
weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode n2)
Calculates the radius of a node based on its two
child nodes.
|
String |
getRevision()
Returns the revision string.
|
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.
|
String |
globalInfo()
Returns a string describing this nearest neighbour search algorithm.
|
containChildBallsTipText, getContainChildBalls, getMaxDepth, getMaxInstancesInLeaf, getMaxRelativeLeafRadius, getNumLeaves, getNumNodes, getOptions, listOptions, maxInstancesInLeafTipText, maxRelativeLeafRadiusTipText, setContainChildBalls, setEuclideanDistanceFunction, setInstanceList, setInstances, setMaxInstancesInLeaf, setMaxRelativeLeafRadius, setOptions
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeCopy
public BottomUpConstructor()
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public BallNode buildTree() throws Exception
buildTree
in class BallTreeConstructor
Exception
- If there is problem building
the tree.public int[] addInstance(BallNode node, Instance inst) throws Exception
addInstance
in class BallTreeConstructor
node
- The root node of the tree.inst
- The instance to add to the tree.Exception
- Always as BottomUpConstructor
does not allow addition of instances after batch
construction.public Instance calcPivot(weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode node1, weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode node2, Instances insts) throws Exception
node1
- The first child node.node2
- The second child node.insts
- The instance on which the tree is to be
built.Exception
- If there is some problem calculating
the centre/pivot of the node.public double calcRadius(weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode n1, weka.core.neighboursearch.balltrees.BottomUpConstructor.TempNode n2) throws Exception
n1
- The first child node.n2
- The second child node.Exception
- If there is some problem
in calculating the radius.public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class BallTreeConstructor
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.