📄 aprioriitemset.html
字号:
<DD>Constructor<P><DT><B>Parameters:</B><DD><CODE>totalTrans</CODE> - the total number of transactions in the data</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="confidenceForRule(weka.associations.AprioriItemSet, weka.associations.AprioriItemSet)"><!-- --></A><H3>confidenceForRule</H3><PRE>public static double <B>confidenceForRule</B>(<A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> premise, <A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> consequence)</PRE><DL><DD>Outputs the confidence for a rule.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>premise</CODE> - the premise of the rule<DD><CODE>consequence</CODE> - the consequence of the rule<DT><B>Returns:</B><DD>the confidence on the training data</DL></DD></DL><HR><A NAME="liftForRule(weka.associations.AprioriItemSet, weka.associations.AprioriItemSet, int)"><!-- --></A><H3>liftForRule</H3><PRE>public double <B>liftForRule</B>(<A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> premise, <A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> consequence, int consequenceCount)</PRE><DL><DD>Outputs the lift for a rule. Lift is defined as:<br> confidence / prob(consequence)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>premise</CODE> - the premise of the rule<DD><CODE>consequence</CODE> - the consequence of the rule<DD><CODE>consequenceCount</CODE> - how many times the consequence occurs independent of the premise<DT><B>Returns:</B><DD>the lift on the training data</DL></DD></DL><HR><A NAME="leverageForRule(weka.associations.AprioriItemSet, weka.associations.AprioriItemSet, int, int)"><!-- --></A><H3>leverageForRule</H3><PRE>public double <B>leverageForRule</B>(<A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> premise, <A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> consequence, int premiseCount, int consequenceCount)</PRE><DL><DD>Outputs the leverage for a rule. Leverage is defined as: <br> prob(premise & consequence) - (prob(premise) * prob(consequence))<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>premise</CODE> - the premise of the rule<DD><CODE>consequence</CODE> - the consequence of the rule<DD><CODE>premiseCount</CODE> - how many times the premise occurs independent of the consequent<DD><CODE>consequenceCount</CODE> - how many times the consequence occurs independent of the premise<DT><B>Returns:</B><DD>the leverage on the training data</DL></DD></DL><HR><A NAME="convictionForRule(weka.associations.AprioriItemSet, weka.associations.AprioriItemSet, int, int)"><!-- --></A><H3>convictionForRule</H3><PRE>public double <B>convictionForRule</B>(<A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> premise, <A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> consequence, int premiseCount, int consequenceCount)</PRE><DL><DD>Outputs the conviction for a rule. Conviction is defined as: <br> prob(premise) * prob(!consequence) / prob(premise & !consequence)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>premise</CODE> - the premise of the rule<DD><CODE>consequence</CODE> - the consequence of the rule<DD><CODE>premiseCount</CODE> - how many times the premise occurs independent of the consequent<DD><CODE>consequenceCount</CODE> - how many times the consequence occurs independent of the premise<DT><B>Returns:</B><DD>the conviction on the training data</DL></DD></DL><HR><A NAME="generateRules(double, weka.core.FastVector, int)"><!-- --></A><H3>generateRules</H3><PRE>public <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A>[] <B>generateRules</B>(double minConfidence, <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> hashtables, int numItemsInSet)</PRE><DL><DD>Generates all rules for an item set.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>minConfidence</CODE> - the minimum confidence the rules have to have<DD><CODE>hashtables</CODE> - containing all(!) previously generated item sets<DD><CODE>numItemsInSet</CODE> - the size of the item set for which the rules are to be generated<DT><B>Returns:</B><DD>all the rules with minimum confidence for the given item set</DL></DD></DL><HR><A NAME="generateRulesBruteForce(double, int, weka.core.FastVector, int, int, double)"><!-- --></A><H3>generateRulesBruteForce</H3><PRE>public final <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A>[] <B>generateRulesBruteForce</B>(double minMetric, int metricType, <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> hashtables, int numItemsInSet, int numTransactions, double significanceLevel) throws java.lang.Exception</PRE><DL><DD>Generates all significant rules for an item set.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>minMetric</CODE> - the minimum metric (confidence, lift, leverage, improvement) the rules have to have<DD><CODE>metricType</CODE> - (confidence=0, lift, leverage, improvement)<DD><CODE>hashtables</CODE> - containing all(!) previously generated item sets<DD><CODE>numItemsInSet</CODE> - the size of the item set for which the rules are to be generated<DT><B>Returns:</B><DD>all the rules with minimum metric for the given item set<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="subtract(weka.associations.AprioriItemSet)"><!-- --></A><H3>subtract</H3><PRE>public final <A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> <B>subtract</B>(<A HREF="../../weka/associations/AprioriItemSet.html" title="class in weka.associations">AprioriItemSet</A> toSubtract)</PRE><DL><DD>Subtracts an item set from another one.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>toSubtract</CODE> - the item set to be subtracted from this one.<DT><B>Returns:</B><DD>an item set that only contains items form this item sets that are not contained by toSubtract</DL></DD></DL><HR><A NAME="toString(weka.core.Instances)"><!-- --></A><H3>toString</H3><PRE>public final java.lang.String <B>toString</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</PRE><DL><DD>Returns the contents of an item set as a string.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/associations/ItemSet.html#toString(weka.core.Instances)">toString</A></CODE> in class <CODE><A HREF="../../weka/associations/ItemSet.html" title="class in weka.associations">ItemSet</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - contains the relevant header information<DT><B>Returns:</B><DD>string describing the item set</DL></DD></DL><HR><A NAME="singletons(weka.core.Instances)"><!-- --></A><H3>singletons</H3><PRE>public static <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> <B>singletons</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances) throws java.lang.Exception</PRE><DL><DD>Converts the header info of the given set of instances into a set of item sets (singletons). The ordering of values in the header file determines the lexicographic order.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the set of instances whose header info is to be used<DT><B>Returns:</B><DD>a set of item sets, each containing a single item<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if singletons can't be generated successfully</DL></DD></DL><HR><A NAME="mergeAllItemSets(weka.core.FastVector, int, int)"><!-- --></A><H3>mergeAllItemSets</H3><PRE>public static <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> <B>mergeAllItemSets</B>(<A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> itemSets, int size, int totalTrans)</PRE><DL><DD>Merges all item sets in the set of (k-1)-item sets to create the (k)-item sets and updates the counters.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>itemSets</CODE> - the set of (k-1)-item sets<DD><CODE>size</CODE> - the value of (k-1)<DT><B>Returns:</B><DD>the generated (k)-item sets</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/associations/Apriori.html" title="class in weka.associations"><B>PREV CLASS</B></A> <A HREF="../../weka/associations/Associator.html" title="class in weka.associations"><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="AprioriItemSet.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -