rulestats.html
来自「由java开发的软件包」· HTML 代码 · 共 1,086 行 · 第 1/3 页
HTML
1,086 行
<PRE>public void <B>addAndUpdate</B>(<A HREF="../../../weka/classifiers/rules/Rule.html" title="class in weka.classifiers.rules">Rule</A> lastRule)</PRE><DL><DD>Add a rule to the ruleset and update the stats<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="subsetDL(double, double, double)"><!-- --></A><H3>subsetDL</H3><PRE>public static double <B>subsetDL</B>(double t, double k, double p)</PRE><DL><DD>Subset description length: <br> S(t,k,p) = -k*log2(p)-(n-k)log2(1-p) Details see Quilan: "MDL and categorical theories (Continued)",ML95<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the number of elements in a known set<DD><CODE>k</CODE> - the number of elements in a subset<DD><CODE>p</CODE> - the expected proportion of subset known by recipient</DL></DD></DL><HR><A NAME="theoryDL(int)"><!-- --></A><H3>theoryDL</H3><PRE>public double <B>theoryDL</B>(int index)</PRE><DL><DD>The description length of the theory for a given rule. Computed as:<br> 0.5* [||k||+ S(t, k, k/t)]<br> where k is the number of antecedents of the rule; t is the total possible antecedents that could appear in a rule; ||K|| is the universal prior for k , log2*(k) and S(t,k,p) = -k*log2(p)-(n-k)log2(1-p) is the subset encoding length.<p> Details see Quilan: "MDL and categorical theories (Continued)",ML95<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the given rule (assuming correct)<DT><B>Returns:</B><DD>the theory DL, weighted if weight != 1.0<DT><B>Throws:</B><DD><CODE>if</CODE> - index out of range or object not initialized yet</DL></DD></DL><HR><A NAME="dataDL(double, double, double, double, double)"><!-- --></A><H3>dataDL</H3><PRE>public static double <B>dataDL</B>(double expFPOverErr, double cover, double uncover, double fp, double fn)</PRE><DL><DD>The description length of data given the parameters of the data based on the ruleset. <p> Details see Quinlan: "MDL and categorical theories (Continued)",ML95<p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>expFPOverErr</CODE> - expected FP/(FP+FN)<DD><CODE>cover</CODE> - coverage<DD><CODE>uncover</CODE> - uncoverage<DD><CODE>fp</CODE> - False Positive<DD><CODE>fn</CODE> - False Negative</DL></DD></DL><HR><A NAME="potential(int, double, double[], double[], boolean)"><!-- --></A><H3>potential</H3><PRE>public double <B>potential</B>(int index, double expFPOverErr, double[] rulesetStat, double[] ruleStat, boolean checkErr)</PRE><DL><DD>Calculate the potential to decrease DL of the ruleset, i.e. the possible DL that could be decreased by deleting the rule whose index and simple statstics are given. If there's no potentials (i.e. smOrEq 0 && error rate < 0.5), it returns NaN. <p> The way this procedure does is copied from original RIPPER implementation and is quite bizzare because it does not update the following rules' stats recursively any more when testing each rule, which means it assumes after deletion no data covered by the following rules (or regards the deleted rule as the last rule). Reasonable assumption?<p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the rule in m_Ruleset to be deleted<DD><CODE>expFPOverErr</CODE> - expected FP/(FP+FN)<DD><CODE>rulesetStat</CODE> - the simple statistics of the ruleset, updated if the rule should be deleted<DD><CODE>ruleStat</CODE> - the simple statistics of the rule to be deleted<DD><CODE>checkErr</CODE> - whether check if error rate >= 0.5<DT><B>Returns:</B><DD>the potential DL that could be decreased</DL></DD></DL><HR><A NAME="minDataDLIfDeleted(int, double, boolean)"><!-- --></A><H3>minDataDLIfDeleted</H3><PRE>public double <B>minDataDLIfDeleted</B>(int index, double expFPRate, boolean checkErr)</PRE><DL><DD>Compute the minimal data description length of the ruleset if the rule in the given position is deleted.<br> The min_data_DL_if_deleted = data_DL_if_deleted - potential<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the rule in question<DD><CODE>expFPRate</CODE> - expected FP/(FP+FN), used in dataDL calculation<DD><CODE>checkErr</CODE> - whether check if error rate >= 0.5</DL></DD></DL><HR><A NAME="minDataDLIfExists(int, double, boolean)"><!-- --></A><H3>minDataDLIfExists</H3><PRE>public double <B>minDataDLIfExists</B>(int index, double expFPRate, boolean checkErr)</PRE><DL><DD>Compute the minimal data description length of the ruleset if the rule in the given position is NOT deleted.<br> The min_data_DL_if_n_deleted = data_DL_if_n_deleted - potential<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the rule in question<DD><CODE>expFPRate</CODE> - expected FP/(FP+FN), used in dataDL calculation<DD><CODE>checkErr</CODE> - whether check if error rate >= 0.5</DL></DD></DL><HR><A NAME="relativeDL(int, double, boolean)"><!-- --></A><H3>relativeDL</H3><PRE>public double <B>relativeDL</B>(int index, double expFPRate, boolean checkErr)</PRE><DL><DD>The description length (DL) of the ruleset relative to if the rule in the given position is deleted, which is obtained by: <br> MDL if the rule exists - MDL if the rule does not exist <br> Note the minimal possible DL of the ruleset is calculated(i.e. some other rules may also be deleted) instead of the DL of the current ruleset.<p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the given position of the rule in question (assuming correct)<DD><CODE>expFPRate</CODE> - expected FP/(FP+FN), used in dataDL calculation<DD><CODE>checkErr</CODE> - whether check if error rate >= 0.5<DT><B>Returns:</B><DD>the relative DL</DL></DD></DL><HR><A NAME="reduceDL(double, boolean)"><!-- --></A><H3>reduceDL</H3><PRE>public void <B>reduceDL</B>(double expFPRate, boolean checkErr)</PRE><DL><DD>Try to reduce the DL of the ruleset by testing removing the rules one by one in reverse order and update all the stats<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>expFPRate</CODE> - expected FP/(FP+FN), used in dataDL calculation<DD><CODE>checkErr</CODE> - whether check if error rate >= 0.5</DL></DD></DL><HR><A NAME="removeLast()"><!-- --></A><H3>removeLast</H3><PRE>public void <B>removeLast</B>()</PRE><DL><DD>Remove the last rule in the ruleset as well as it's stats. It might be useful when the last rule was added for testing purpose and then the test failed<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="rmCoveredBySuccessives(weka.core.Instances, weka.core.FastVector, int)"><!-- --></A><H3>rmCoveredBySuccessives</H3><PRE>public static <A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>rmCoveredBySuccessives</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, <A HREF="../../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> rules, int index)</PRE><DL><DD>Static utility function to count the data covered by the rules after the given index in the given rules, and then remove them. It returns the data not covered by the successive rules.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to be processed<DD><CODE>rules</CODE> - the ruleset<DD><CODE>index</CODE> - the given index<DT><B>Returns:</B><DD>the data after processing</DL></DD></DL><HR><A NAME="stratify(weka.core.Instances, int, java.util.Random)"><!-- --></A><H3>stratify</H3><PRE>public static final <A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>stratify</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int folds, java.util.Random rand)</PRE><DL><DD>Stratify the given data into the given number of bags based on the class values. It differs from the <code>Instances.stratify(int fold)</code> that before stratification it sorts the instances according to the class order in the header file. It assumes no missing values in the class.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the given data<DD><CODE>folds</CODE> - the given number of folds<DD><CODE>rand</CODE> - the random object used to randomize the instances<DT><B>Returns:</B><DD>the stratified instances</DL></DD></DL><HR><A NAME="combinedDL(double, double)"><!-- --></A><H3>combinedDL</H3><PRE>public double <B>combinedDL</B>(double expFPRate, double predicted)</PRE><DL><DD>Compute the combined DL of the ruleset in this class, i.e. theory DL and data DL. Note this procedure computes the combined DL according to the current status of the ruleset in this class<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>expFPRate</CODE> - expected FP/(FP+FN), used in dataDL calculation<DD><CODE>predicted</CODE> - the default classification if ruleset covers null<DT><B>Returns:</B><DD>the combined class</DL></DD></DL><HR><A NAME="partition(weka.core.Instances, int)"><!-- --></A><H3>partition</H3><PRE>public static final <A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A>[] <B>partition</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int numFolds)</PRE><DL><DD>Patition the data into 2, first of which has (numFolds-1)/numFolds of the data and the second has 1/numFolds of the data<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the given data<DD><CODE>numFolds</CODE> - the given number of folds<DT><B>Returns:</B><DD>the patitioned instances</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../weka/classifiers/rules/Rule.html" title="class in weka.classifiers.rules"><B>PREV CLASS</B></A> <A HREF="../../../weka/classifiers/rules/ZeroR.html" title="class in weka.classifiers.rules"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="RuleStats.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?