Package weka.core.neighboursearch.balltrees

Examples of weka.core.neighboursearch.balltrees.BallNode


   * @return The root node of the tree.
   * @throws Exception If there is problem building
   * the tree.
   */
  public BallNode buildTree() throws Exception {
    BallNode root;
   
    m_NumNodes = m_MaxDepth = 0;
    m_NumLeaves = 1;
   
    m_Splitter.setInstances(m_Instances);
    m_Splitter.setInstanceList(m_InstList);
    m_Splitter.
    setEuclideanDistanceFunction((EuclideanDistance)m_DistanceFunction);
   
    root = new BallNode(0, m_InstList.length-1, 0);
    root.setPivot(BallNode.calcCentroidPivot(m_InstList, m_Instances));
    root.setRadius(BallNode.calcRadius(m_InstList, m_Instances, root.getPivot(), m_DistanceFunction));
   
    splitNodes(root, m_MaxDepth+1, root.m_Radius);
   
    return root;
  }
View Full Code Here


   * @return The root node of the tree.
   * @throws Exception If there is problem building
   * the tree.
   */
  public BallNode buildTree() throws Exception {
    BallNode root;
   
    m_NumNodes = m_MaxDepth = 0;
    m_NumLeaves = 1;
   
    m_Splitter.setInstances(m_Instances);
    m_Splitter.setInstanceList(m_InstList);
    m_Splitter.
    setEuclideanDistanceFunction((EuclideanDistance)m_DistanceFunction);
   
    root = new BallNode(0, m_InstList.length-1, 0);
    root.setPivot(BallNode.calcCentroidPivot(m_InstList, m_Instances));
    root.setRadius(BallNode.calcRadius(m_InstList, m_Instances, root.getPivot(), m_DistanceFunction));
   
    splitNodes(root, m_MaxDepth+1, root.m_Radius);
   
    return root;
  }
View Full Code Here

TOP

Related Classes of weka.core.neighboursearch.balltrees.BallNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.