📄 distribution.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/j48/Distribution.html#numIncorrect()">numIncorrect</A></B>()</CODE><BR> Returns total-numCorrect().</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/classifiers/j48/Distribution.html#numIncorrect(int)">numIncorrect</A></B>(int index)</CODE><BR> Returns perBag(index)-numCorrect(index).</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/classifiers/j48/Distribution.html#perBag(int)">perBag</A></B>(int bagIndex)</CODE><BR> Returns number of (possibly fractional) instances in given bag.</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/classifiers/j48/Distribution.html#perClass(int)">perClass</A></B>(int classIndex)</CODE><BR> Returns number of (possibly fractional) instances of given class.</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/classifiers/j48/Distribution.html#perClassPerBag(int, int)">perClassPerBag</A></B>(int bagIndex, int classIndex)</CODE><BR> Returns number of (possibly fractional) instances of given class in given bag.</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/classifiers/j48/Distribution.html#prob(int)">prob</A></B>(int classIndex)</CODE><BR> Returns relative frequency of class over all bags.</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/classifiers/j48/Distribution.html#prob(int, int)">prob</A></B>(int classIndex, int intIndex)</CODE><BR> Returns relative frequency of class for given bag.</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/classifiers/j48/Distribution.html#shift(int, int, weka.core.Instance)">shift</A></B>(int from, int to, <A HREF="../../../weka/core/Instance.html">Instance</A> instance)</CODE><BR> Shifts given instance from one bag to another one.</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/classifiers/j48/Distribution.html#shiftRange(int, int, weka.core.Instances, int, int)">shiftRange</A></B>(int from, int to, <A HREF="../../../weka/core/Instances.html">Instances</A> source, int startIndex, int lastPlusOne)</CODE><BR> Shifts all instances in given range from one bag to another one.</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/classifiers/j48/Distribution.html#sub(int, weka.core.Instance)">sub</A></B>(int bagIndex, <A HREF="../../../weka/core/Instance.html">Instance</A> instance)</CODE><BR> Subtracts given instance from given bag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../weka/classifiers/j48/Distribution.html">Distribution</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/j48/Distribution.html#subtract(weka.classifiers.j48.Distribution)">subtract</A></B>(<A HREF="../../../weka/classifiers/j48/Distribution.html">Distribution</A> toSubstract)</CODE><BR> Subtracts the given distribution from this one.</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/classifiers/j48/Distribution.html#total()">total</A></B>()</CODE><BR> Returns total number of (possibly fractional) instances.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Distribution(int, int)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(int numBags, int numClasses)</PRE><DL><DD>Creates and initializes a new distribution.</DL><HR><A NAME="Distribution(double[][])"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(double[][] table)</PRE><DL><DD>Creates and initializes a new distribution using the given array. WARNING: it just copies a reference to this array.</DL><HR><A NAME="Distribution(weka.core.Instances)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../weka/core/Instances.html">Instances</A> source) throws java.lang.Exception</PRE><DL><DD>Creates a distribution with only one bag according to instances in source.<DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="Distribution(weka.core.Instances, weka.classifiers.j48.ClassifierSplitModel)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../weka/core/Instances.html">Instances</A> source, <A HREF="../../../weka/classifiers/j48/ClassifierSplitModel.html">ClassifierSplitModel</A> modelToUse) throws java.lang.Exception</PRE><DL><DD>Creates a distribution according to given instances and split model.<DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="Distribution(weka.classifiers.j48.Distribution)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../weka/classifiers/j48/Distribution.html">Distribution</A> toMerge)</PRE><DL><DD>Creates distribution with only one bag by merging all bags of given distribution.</DL><HR><A NAME="Distribution(weka.classifiers.j48.Distribution, int)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../weka/classifiers/j48/Distribution.html">Distribution</A> toMerge, int index)</PRE><DL><DD>Creates distribution with two bags by merging all bags apart of the indicated one.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="actualNumBags()"><!-- --></A><H3>actualNumBags</H3><PRE>public final int <B>actualNumBags</B>()</PRE><DL><DD>Returns number of non-empty bags of distribution.<DD><DL></DL></DD></DL><HR><A NAME="actualNumClasses()"><!-- --></A><H3>actualNumClasses</H3><PRE>public final int <B>actualNumClasses</B>()</PRE><DL><DD>Returns number of classes actually occuring in distribution.<DD><DL></DL></DD></DL><HR><A NAME="actualNumClasses(int)"><!-- --></A><H3>actualNumClasses</H3><PRE>public final int <B>actualNumClasses</B>(int bagIndex)</PRE><DL><DD>Returns number of classes actually occuring in given bag.<DD><DL></DL></DD></DL><HR><A NAME="add(int, weka.core.Instance)"><!-- --></A><H3>add</H3><PRE>public final void <B>add</B>(int bagIndex, <A HREF="../../../weka/core/Instance.html">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Adds given instance to given bag.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="sub(int, weka.core.Instance)"><!-- --></A><H3>sub</H3><PRE>public final void <B>sub</B>(int bagIndex, <A HREF="../../../weka/core/Instance.html">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Subtracts given instance from given bag.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="add(int, double[])"><!-- --></A><H3>add</H3><PRE>public final void <B>add</B>(int bagIndex, double[] counts)</PRE><DL><DD>Adds counts to given bag.<DD><DL></DL></DD></DL><HR><A NAME="addInstWithUnknown(weka.core.Instances, int)"><!-- --></A><H3>addInstWithUnknown</H3><PRE>public final void <B>addInstWithUnknown</B>(<A HREF="../../../weka/core/Instances.html">Instances</A> source, int attIndex) throws java.lang.Exception</PRE><DL><DD>Adds all instances with unknown values for given attribute, weighted according to frequency of instances in each bag.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="addRange(int, weka.core.Instances, int, int)"><!-- --></A><H3>addRange</H3><PRE>public final void <B>addRange</B>(int bagIndex, <A HREF="../../../weka/core/Instances.html">Instances</A> source, int startIndex, int lastPlusOne) throws java.lang.Exception</PRE><DL><DD>Adds all instances in given range to given bag.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="addWeights(weka.core.Instance, double[])"><!-- --></A><H3>addWeights</H3><PRE>public final void <B>addWeights</B>(<A HREF="../../../weka/core/Instance.html">Instance</A> instance, double[] weights) throws java.lang.Exception</PRE><DL><DD>Adds given instance to all bags weighting it according to given weights.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="check(double)"><!-- --></A><H3>check</H3><PRE>public final boolean <B>check</B>(double minNoObj)</PRE><DL><DD>Checks if at least two bags contain a minimum number of instances.<DD><DL></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public final java.lang.Object <B>clone</B>()</PRE><DL><DD>Clones distribution (Deep copy of distribution).<DD><DL><DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -