📄 distribution.html
字号:
<TD><CODE><B><A HREF="../../../../weka/classifiers/trees/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/trees/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/trees/j48/Distribution.html#shift(int, int, weka.core.Instance)">shift</A></B>(int from, int to, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">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/trees/j48/Distribution.html#shiftRange(int, int, weka.core.Instances, int, int)">shiftRange</A></B>(int from, int to, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">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/trees/j48/Distribution.html#sub(int, weka.core.Instance)">sub</A></B>(int bagIndex, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">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/trees/j48/Distribution.html" title="class in weka.classifiers.trees.j48">Distribution</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/trees/j48/Distribution.html#subtract(weka.classifiers.trees.j48.Distribution)">subtract</A></B>(<A HREF="../../../../weka/classifiers/trees/j48/Distribution.html" title="class in weka.classifiers.trees.j48">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/trees/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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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, 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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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.<P></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.<P></DL><HR><A NAME="Distribution(weka.core.Instances)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> source) throws java.lang.Exception</PRE><DL><DD>Creates a distribution with only one bag according to instances in source.<P><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL><HR><A NAME="Distribution(weka.core.Instances, weka.classifiers.trees.j48.ClassifierSplitModel)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> source, <A HREF="../../../../weka/classifiers/trees/j48/ClassifierSplitModel.html" title="class in weka.classifiers.trees.j48">ClassifierSplitModel</A> modelToUse) throws java.lang.Exception</PRE><DL><DD>Creates a distribution according to given instances and split model.<P><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL><HR><A NAME="Distribution(weka.classifiers.trees.j48.Distribution)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../../weka/classifiers/trees/j48/Distribution.html" title="class in weka.classifiers.trees.j48">Distribution</A> toMerge)</PRE><DL><DD>Creates distribution with only one bag by merging all bags of given distribution.<P></DL><HR><A NAME="Distribution(weka.classifiers.trees.j48.Distribution, int)"><!-- --></A><H3>Distribution</H3><PRE>public <B>Distribution</B>(<A HREF="../../../../weka/classifiers/trees/j48/Distribution.html" title="class in weka.classifiers.trees.j48">Distribution</A> toMerge, int index)</PRE><DL><DD>Creates distribution with two bags by merging all bags apart of the indicated one.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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.<P><DD><DL></DL></DD><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.<P><DD><DL></DL></DD><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.<P><DD><DL></DL></DD><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" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Adds given instance to given bag.<P><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" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Subtracts given instance from given bag.<P><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.<P><DD><DL></DL></DD><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" title="class in weka.core">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.<P><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" title="class in weka.core">Instances</A> source, int startIndex, int lastPlusOne) throws java.lang.Exception</PRE><DL><DD>Adds all instances in given range to given bag.<P><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" title="class in weka.core">Instance</A> instance, double[] weights) throws java.lang.Exception</PRE><DL><DD>Adds given instance to all bags weighting it according to given weights.<P><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.<P><DD><DL></DL></DD><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).<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="del(int, weka.core.Instance)"><!-- --></A><H3>del</H3><PRE>public final void <B>del</B>(int bagIndex, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Deletes given instance from given bag.<P><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="delRange(int, weka.core.Instances, int, int)"><!-- --></A><H3>delRange</H3><PRE>public final void <B>delRange</B>(int bagIndex, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> source, int startIndex, int lastPlusOne) throws java.lang.Exception</PRE><DL><DD>Deletes all instances in given range from given bag.<P><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="dumpDistribution()"><!-- --></A><H3>dumpDistribution</H3><PRE>public final java.lang.String <B>dumpDistribution</B>()</PRE><DL><DD>Prints distribution.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="initialize()"><!-- --></A><H3>initialize</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -