balltree.html

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

HTML
906
字号
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#measureNumLeaves()">measureNumLeaves</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of leaves.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#measureTreeSize()">measureTreeSize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the size of the tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#nearestNeighbour(weka.core.Instance)">nearestNeighbour</A></B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the nearest instance in the current neighbourhood to the supplied instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#setBallTreeConstructor(weka.core.neighboursearch.balltrees.BallTreeConstructor)">setBallTreeConstructor</A></B>(<A HREF="../../../weka/core/neighboursearch/balltrees/BallTreeConstructor.html" title="class in weka.core.neighboursearch.balltrees">BallTreeConstructor</A>&nbsp;constructor)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the BallTreeConstructor for building the BallTree  (default TopDownConstructor).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#setInstances(weka.core.Instances)">setInstances</A></B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Builds the BallTree based on the given set of instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#setMeasurePerformance(boolean)">setMeasurePerformance</A></B>(boolean&nbsp;measurePerformance)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether to calculate the performance statistics or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#setOptions(java.lang.String[])">setOptions</A></B>(java.lang.String[]&nbsp;options)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses a given list of options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/BallTree.html#update(weka.core.Instance)">update</A></B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;ins)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds one instance to the BallTree.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_weka.core.neighboursearch.NearestNeighbourSearch"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class weka.core.neighboursearch.<A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#combSort11(double[], int[])">combSort11</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#distanceFunctionTipText()">distanceFunctionTipText</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getDistanceFunction()">getDistanceFunction</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getInstances()">getInstances</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getMeasurePerformance()">getMeasurePerformance</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getPerformanceStats()">getPerformanceStats</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#measurePerformanceTipText()">measurePerformanceTipText</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#quickSort(double[], double[], int, int)">quickSort</A>, <A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#setDistanceFunction(weka.core.DistanceFunction)">setDistanceFunction</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="BallTree()"><!-- --></A><H3>BallTree</H3><PRE>public <B>BallTree</B>()</PRE><DL><DD>Creates a new instance of BallTree.<P></DL><HR><A NAME="BallTree(weka.core.Instances)"><!-- --></A><H3>BallTree</H3><PRE>public <B>BallTree</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;insts)</PRE><DL><DD>Creates a new instance of BallTree.  It also builds the tree on supplied set of Instances.<P><DL><DT><B>Parameters:</B><DD><CODE>insts</CODE> - The instances/points on which the BallTree  should be built on.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="globalInfo()"><!-- --></A><H3>globalInfo</H3><PRE>public java.lang.String <B>globalInfo</B>()</PRE><DL><DD>Returns a string describing this nearest neighbour search algorithm.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#globalInfo()">globalInfo</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a description of the algorithm for displaying in the                        explorer/experimenter gui</DL></DD></DL><HR><A NAME="getTechnicalInformation()"><!-- --></A><H3>getTechnicalInformation</H3><PRE>public <A HREF="../../../weka/core/TechnicalInformation.html" title="class in weka.core">TechnicalInformation</A> <B>getTechnicalInformation</B>()</PRE><DL><DD>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.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/TechnicalInformationHandler.html#getTechnicalInformation()">getTechnicalInformation</A></CODE> in interface <CODE><A HREF="../../../weka/core/TechnicalInformationHandler.html" title="interface in weka.core">TechnicalInformationHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the technical information about this class</DL></DD></DL><HR><A NAME="kNearestNeighbours(weka.core.Instance, int)"><!-- --></A><H3>kNearestNeighbours</H3><PRE>public <A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>kNearestNeighbours</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;target,                                    int&nbsp;k)                             throws java.lang.Exception</PRE><DL><DD>Returns k nearest instances in the current neighbourhood to the supplied instance. &gt;k instances can be returned if there is more than one instance  at the kth boundary (i.e. if there are more than 1 instance with the  same distance as the kth nearest neighbour).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#kNearestNeighbours(weka.core.Instance, int)">kNearestNeighbours</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>target</CODE> - The instance to find the k nearest neighbours for.<DD><CODE>k</CODE> - The number of nearest neighbours to find.<DT><B>Returns:</B><DD>The k nearest neighbours of the given target instance  (&gt;k nearest neighbours, if there are more instances that have same   distance as the kth nearest neighbour).<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If the neighbours could not be found.</DL></DD></DL><HR><A NAME="nearestNeighbour(weka.core.Instance)"><!-- --></A><H3>nearestNeighbour</H3><PRE>public <A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>nearestNeighbour</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;target)                          throws java.lang.Exception</PRE><DL><DD>Returns the nearest instance in the current neighbourhood to the supplied instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#nearestNeighbour(weka.core.Instance)">nearestNeighbour</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>target</CODE> - The instance to find the nearest neighbour for.<DT><B>Returns:</B><DD>The nearest neighbour of the given target instance.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the nearest neighbour could not be found.</DL></DD></DL><HR><A NAME="getDistances()"><!-- --></A><H3>getDistances</H3><PRE>public double[] <B>getDistances</B>()                      throws java.lang.Exception</PRE><DL><DD>Returns the distances of the k nearest neighbours. The kNearestNeighbours or nearestNeighbour must always be called before calling this function. If this function is called before calling either the kNearestNeighbours or  the nearestNeighbour, then it throws an exception. If, however, any  one of the two functions is called at any point in the past, then no    exception is thrown and the distances of NN(s) from the training set for  the last supplied target instance (to either one of the nearestNeighbour  functions) is/are returned.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getDistances()">getDistances</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>array containing the distances of the                 nearestNeighbours. The length and ordering of the                 array is the same as that of the instances returned                 by nearestNeighbour functions.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if called before calling kNearestNeighbours                or nearestNeighbours.</DL></DD></DL><HR><A NAME="update(weka.core.Instance)"><!-- --></A><H3>update</H3><PRE>public void <B>update</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;ins)            throws java.lang.Exception</PRE><DL><DD>Adds one instance to the BallTree. This involves creating/updating the  structure to reflect the newly added training instance<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#update(weka.core.Instance)">update</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ins</CODE> - The instance to be added. Usually the newly added instance in the            training set.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If the instance cannot be added to the tree.</DL></DD></DL><HR><A NAME="addInstanceInfo(weka.core.Instance)"><!-- --></A><H3>addInstanceInfo</H3><PRE>public void <B>addInstanceInfo</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;ins)</PRE><DL><DD>Adds the given instance's info. This implementation updates the attributes'  range datastructures of EuclideanDistance class.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#addInstanceInfo(weka.core.Instance)">addInstanceInfo</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ins</CODE> - The instance to add the information of. Usually this is                        the test instance supplied to update the range of                         attributes in the distance function.</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)                  throws java.lang.Exception</PRE><DL><DD>Builds the BallTree based on the given set of instances.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#setInstances(weka.core.Instances)">setInstances</A></CODE> in class <CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html" title="class in weka.core.neighboursearch">NearestNeighbourSearch</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>insts</CODE> - The insts for which the BallTree is to be  built.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If some error occurs while  building the BallTree</DL>

⌨️ 快捷键说明

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