middleoutconstructor.html

来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 1,123 行 · 第 1/4 页

HTML
1,123
字号
 an index array and stores those indices, together with their distances to the given anchor node,  in the point index list of the anchor node.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - The node in which the points are needed to be set.<DD><CODE>startIdx</CODE> - The start of the portion in  the given index array (the master index array).<DD><CODE>endIdx</CODE> - The end of the portion in the given index array.<DD><CODE>indices</CODE> - The index array.</DL></DD></DL><HR><A NAME="setInterAnchorDistances(java.util.Vector, weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode, java.util.Vector)"><!-- --></A><H3>setInterAnchorDistances</H3><PRE>public void <B>setInterAnchorDistances</B>(java.util.Vector&nbsp;anchors,                                    weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;newAnchor,                                    java.util.Vector&nbsp;anchorDistances)                             throws java.lang.Exception</PRE><DL><DD>Sets the distances of a supplied new anchor to all the rest of the  previous anchor points.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>anchors</CODE> - The old anchor points.<DD><CODE>newAnchor</CODE> - The new anchor point.<DD><CODE>anchorDistances</CODE> - The vector to store the distances of newAnchor to  each of the old anchors.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If there is some  problem in calculating the distances.</DL></DD></DL><HR><A NAME="stealPoints(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode, java.util.Vector, java.util.Vector)"><!-- --></A><H3>stealPoints</H3><PRE>public boolean <B>stealPoints</B>(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;newAnchor,                           java.util.Vector&nbsp;anchors,                           java.util.Vector&nbsp;anchorDistances)</PRE><DL><DD>Removes points from old anchors that are nearer to the given new anchor and adds them to the list of points of the new anchor.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newAnchor</CODE> - The new anchor.<DD><CODE>anchors</CODE> - The old anchors.<DD><CODE>anchorDistances</CODE> - The distances of new anchor to each of the old  anchors.<DT><B>Returns:</B><DD>true if any points are removed from the old anchors</DL></DD></DL><HR><A NAME="calcPivot(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode, weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode, weka.core.Instances)"><!-- --></A><H3>calcPivot</H3><PRE>public <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>calcPivot</B>(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;node1,                          weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;node2,                          <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</PRE><DL><DD>/** Calculates the centroid pivot of a node based on its two child nodes (if merging two nodes).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>node1</CODE> - The first child.<DD><CODE>node2</CODE> - The second child.<DD><CODE>insts</CODE> - The set of instances on which the tree  is being built (as dataset header information is  required).<DT><B>Returns:</B><DD>The centroid pivot of a node.</DL></DD></DL><HR><A NAME="calcPivot(weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList, weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList, weka.core.Instances)"><!-- --></A><H3>calcPivot</H3><PRE>public <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>calcPivot</B>(weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList&nbsp;list1,                          weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList&nbsp;list2,                          <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</PRE><DL><DD>Calculates the centroid pivot of a node based on  the list of points that it  contains (tbe two  lists of its children are provided).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>list1</CODE> - The point index list of first child.<DD><CODE>list2</CODE> - The point index list of second  child.<DD><CODE>insts</CODE> - The insts object on which the tree  is being built (for header information).<DT><B>Returns:</B><DD>The centroid pivot of the node.</DL></DD></DL><HR><A NAME="calcRadius(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode, weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode)"><!-- --></A><H3>calcRadius</H3><PRE>public double <B>calcRadius</B>(weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;n1,                         weka.core.neighboursearch.balltrees.MiddleOutConstructor.TempNode&nbsp;n2)</PRE><DL><DD>Calculates the radius of a node based on its two  child nodes (if merging two nodes).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n1</CODE> - The first child of the node.<DD><CODE>n2</CODE> - The second child of the node.<DT><B>Returns:</B><DD>The radius of the node.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL><HR><A NAME="calcRadius(weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList, weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList, weka.core.Instance, weka.core.Instances)"><!-- --></A><H3>calcRadius</H3><PRE>public double <B>calcRadius</B>(weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList&nbsp;list1,                         weka.core.neighboursearch.balltrees.MiddleOutConstructor.MyIdxList&nbsp;list2,                         <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;pivot,                         <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</PRE><DL><DD>Calculates the radius of a node based on the list of points that it contains (the two lists of  its children are provided).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>list1</CODE> - The point index list of first child.<DD><CODE>list2</CODE> - The point index list of second child.<DD><CODE>pivot</CODE> - The centre/pivot of the node.<DD><CODE>insts</CODE> - The instances on which the tree is  being built (for header info).<DT><B>Returns:</B><DD>The radius of the node.</DL></DD></DL><HR><A NAME="addInstance(weka.core.neighboursearch.balltrees.BallNode, weka.core.Instance)"><!-- --></A><H3>addInstance</H3><PRE>public int[] <B>addInstance</B>(<A HREF="../../../../weka/core/neighboursearch/balltrees/BallNode.html" title="class in weka.core.neighboursearch.balltrees">BallNode</A>&nbsp;node,                         <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;inst)                  throws java.lang.Exception</PRE><DL><DD>Adds an instance to the tree. This implementation of  MiddleOutConstructor doesn't support addition of  instances to already built tree, hence it always throws an exception.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html#addInstance(weka.core.neighboursearch.balltrees.BallNode, weka.core.Instance)">addInstance</A></CODE> in class <CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html" title="class in weka.core.neighboursearch.balltrees">BallTreeConstructor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - The root of the tree to which the  instance is to be added.<DD><CODE>inst</CODE> - The instance to add to the tree.<DT><B>Returns:</B><DD>The updated master index array after  adding the instance.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - Always as this implementation of MiddleOutConstructor doesn't support addition of instances after batch construction of the tree.</DL></DD></DL><HR><A NAME="setMaxInstancesInLeaf(int)"><!-- --></A><H3>setMaxInstancesInLeaf</H3><PRE>public void <B>setMaxInstancesInLeaf</B>(int&nbsp;num)                           throws java.lang.Exception</PRE><DL><DD>Sets the maximum number of instances allowed in a leaf.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html#setMaxInstancesInLeaf(int)">setMaxInstancesInLeaf</A></CODE> in class <CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html" title="class in weka.core.neighboursearch.balltrees">BallTreeConstructor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>num</CODE> - The maximum number of instances allowed in  a leaf.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If the num is < 2, as the method  cannot work for < 2 instances.</DL></DD></DL><HR><A NAME="setInstances(weka.core.Instances)"><!-- --></A><H3>setInstances</H3><PRE>public void <B>setInstances</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</PRE><DL><DD>Sets the instances on which the tree is to be built.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html#setInstances(weka.core.Instances)">setInstances</A></CODE> in class <CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html" title="class in weka.core.neighboursearch.balltrees">BallTreeConstructor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - The instances on which to build the  ball tree.</DL></DD></DL><HR><A NAME="setInstanceList(int[])"><!-- --></A><H3>setInstanceList</H3><PRE>public void <B>setInstanceList</B>(int[]&nbsp;instList)</PRE><DL><DD>Sets the master index array that points to  instances in m_Instances, so that only this array is manipulated, and m_Instances is left  untouched.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html#setInstanceList(int[])">setInstanceList</A></CODE> in class <CODE><A HREF="../../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html" title="class in weka.core.neighboursearch.balltrees">BallTreeConstructor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instList</CODE> - The master index array.</DL></DD></DL><HR><A NAME="initialAnchorRandomTipText()"><!-- --></A><H3>initialAnchorRandomTipText</H3><PRE>public java.lang.String <B>initialAnchorRandomTipText</B>()</PRE><DL><DD>Returns the tip text for this property.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for                        displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="isInitialAnchorRandom()"><!-- --></A><H3>isInitialAnchorRandom</H3><PRE>public boolean <B>isInitialAnchorRandom</B>()</PRE><DL><DD>Gets whether if the initial anchor is chosen randomly.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the initial anchor is a random one.</DL></DD></DL><HR><A NAME="setInitialAnchorRandom(boolean)"><!-- --></A><H3>setInitialAnchorRandom</H3><PRE>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?