📄 covertree.html
字号:
<CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#measureMaxDepth()">measureMaxDepth</A></B>()</CODE><BR> Returns the depth of the tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#measureNumLeaves()">measureNumLeaves</A></B>()</CODE><BR> Returns the number of leaves.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#measureTreeSize()">measureTreeSize</A></B>()</CODE><BR> Returns the size of the tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#nearestNeighbour(weka.core.Instance)">nearestNeighbour</A></B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> target)</CODE><BR> Returns the NN instance of a given target instance, from among the previously supplied training instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#setBase(double)">setBase</A></B>(double b)</CODE><BR> Sets the base to use for expansion constant.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#setDistanceFunction(weka.core.DistanceFunction)">setDistanceFunction</A></B>(<A HREF="../../../weka/core/DistanceFunction.html" title="interface in weka.core">DistanceFunction</A> df)</CODE><BR> Sets the distance function to use for nearest neighbour search.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#setInstances(weka.core.Instances)">setInstances</A></B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</CODE><BR> Builds the Cover Tree on the given set of instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#setOptions(java.lang.String[])">setOptions</A></B>(java.lang.String[] options)</CODE><BR> Parses a given list of options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/neighboursearch/CoverTree.html#update(weka.core.Instance)">update</A></B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> ins)</CODE><BR> Adds an instance to the cover tree.</TD></TR></TABLE> <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#setMeasurePerformance(boolean)">setMeasurePerformance</A></CODE></TD></TR></TABLE> <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> <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="CoverTree()"><!-- --></A><H3>CoverTree</H3><PRE>public <B>CoverTree</B>()</PRE><DL><DD>default constructor.<P></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="listOptions()"><!-- --></A><H3>listOptions</H3><PRE>public java.util.Enumeration <B>listOptions</B>()</PRE><DL><DD>Returns an enumeration describing the available options.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#listOptions()">listOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#listOptions()">listOptions</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>an enumeration of all the available options.</DL></DD></DL><HR><A NAME="setOptions(java.lang.String[])"><!-- --></A><H3>setOptions</H3><PRE>public void <B>setOptions</B>(java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Parses a given list of options. <p/> <!-- options-start --> Valid options are: <p/> <pre> -B <value> Set base of the expansion constant (default = 1.3).</pre> <!-- options-end --><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#setOptions(java.lang.String[])">setOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#setOptions(java.lang.String[])">setOptions</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>options</CODE> - the list of options as an array of strings<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an option is not supported</DL></DD></DL><HR><A NAME="getOptions()"><!-- --></A><H3>getOptions</H3><PRE>public java.lang.String[] <B>getOptions</B>()</PRE><DL><DD>Gets the current settings of KDtree.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#getOptions()">getOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/core/neighboursearch/NearestNeighbourSearch.html#getOptions()">getOptions</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>an array of strings suitable for passing to setOptions</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> target, int k) throws java.lang.Exception</PRE><DL><DD>Returns k-NNs of a given target instance, from among the previously supplied training instances (supplied through setInstances method) P.S.: May return more than k-NNs if more one instances have the same distance to the target as the kth NN.<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 for which k-NNs are required.<DD><CODE>k</CODE> - The number of k-NNs to find.<DT><B>Returns:</B><DD>The k-NN instances of the given target instance.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If there is some problem find the k-NNs.</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> target) throws java.lang.Exception</PRE><DL><DD>Returns the NN instance of a given target instance, from among the previously supplied training instances.<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 for which NN is required.<DT><B>Returns:</B><DD>The NN instance of the target instance.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If there is some problem finding the nearest neighbour.</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)-NN(s) found earlier by kNearestNeighbours()/nearestNeighbour().<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>The distances (in the same order) of the k-NNs.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If the tree hasn't been built (by calling setInstances()), or none of kNearestNeighbours() or nearestNeighbour() has been called before.</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> instances) throws java.lang.Exception</PRE><DL><DD>Builds the Cover Tree 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>instances</CODE> - The insts on which the Cover Tree is to be built.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - If some error occurs while
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -