⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classmsapriori__trie.html

📁 Aprior的C++实现算法
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>APRIORI algorithm: MSApriori_Trie class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.5 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>MSApriori_Trie Class Reference</h1>Apriori_Trie (or prefix-tree) is a tree-based datastructure.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="MSApriori__Trie_8hpp-source.html">MSApriori_Trie.hpp</a>&gt;</code><p>Collaboration diagram for MSApriori_Trie:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classMSApriori__Trie-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a0">MSApriori_Trie</a> (const unsigned long counter_of_emptyset, const vector&lt; double &gt; &amp;<a class="el" href="classMSApriori__Trie.html#p2">mis_abs</a>)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a1">insert_frequent_items</a> (const set&lt; pair&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a>, unsigned long &gt; &gt; &amp;counters)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert the frequent items and their counters into the trie;.  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a2">candidate_generation</a> (const <a class="el" href="common_8hpp.html#a0">itemtype</a> &amp;frequent_size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidates.  <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a3">find_candidate</a> (const vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;basket, const <a class="el" href="common_8hpp.html#a0">itemtype</a> candidate_size, const unsigned long counter=1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increases the counter of those candidates that are contained by the given basket.  <a href="#a3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a4">delete_infrequent</a> (const <a class="el" href="common_8hpp.html#a0">itemtype</a> candidate_size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes unfrequent itemsets.  <a href="#a4"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a5">association</a> (const double min_conf, <a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates association rules.  <a href="#a5"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="common_8hpp.html#a0">itemtype</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a6">longest_path</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the length of the longest path in the Apriori_Trie.  <a href="#a6"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a7">write_content_to_file</a> (<a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes the content (frequent itemsets) to the file.  <a href="#a7"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a8">show_content_preorder</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This procedure shows the Apriori_Trie in a preorde.  <a href="#a8"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#a9">~MSApriori_Trie</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b0">is_all_subset_frequent</a> (const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;maybe_candidate) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decides if all subset of an itemset is contained in the Apriori_Trie.  <a href="#b0"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b1">candidate_generation_two</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidate of size two.  <a href="#b1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b2">candidate_generation_assist</a> (<a class="el" href="classTrie.html">Trie</a> *<a class="el" href="classTrie.html">Trie</a>, const <a class="el" href="common_8hpp.html#a0">itemtype</a> distance_from_generator, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;maybe_candidate)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidate of size more than two.  <a href="#b2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b3">find_candidate_two</a> (const vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;basket, const unsigned long counter=1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increases the counter for those itempairs that are in the given basket.  <a href="#b3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b4">delete_infrequent_two</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes the Tries that represent infrequent itemsets of size 2.  <a href="#b4"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b5">assoc_rule_find</a> (const double min_conf, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;condition_part, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;consequence_part, const unsigned long union_support, <a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager) const </td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b6">assoc_rule_assist</a> (const double min_conf, const <a class="el" href="classTrie.html">Trie</a> *<a class="el" href="classTrie.html">Trie</a>, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;consequence_part, <a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager) const </td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#b7">write_content_to_file_assist</a> (<a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager, const <a class="el" href="classTrie.html">Trie</a> *actual_state, const <a class="el" href="common_8hpp.html#a0">itemtype</a> distance_from_frequent, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;frequent_itemset) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes out the content of the Apriori_Trie (frequent itemset and counters).  <a href="#b7"></a><br><br></td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classTrie.html">Trie</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#p0">main_trie</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classTrie.html">Trie</a> to store the candidates and the frequent itemsets.  <a href="#p0"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>vector&lt; vector&lt; unsigned long &gt; &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#p1">temp_counter_array</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">temp_counter_array stores the occurences of the itempairs  <a href="#p1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>vector&lt; double &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMSApriori__Trie.html#p2">mis_abs</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The mis values.  <a href="#p2"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Apriori_Trie (or prefix-tree) is a tree-based datastructure. <p>Apriori_Trie is a special tree designed to provide efficient methods for the apriori algorithm. It mostly uses a regular trie except when there exist faster solution. For example for storing one and two itemset candidate where a simple vector and array gives better performance. Apriori_Trie extends the functions provided by the regular trie with a candidate generation process. <p><p>Definition at line <a class="el" href="MSApriori__Trie_8hpp-source.html#l00032">32</a> of file <a class="el" href="MSApriori__Trie_8hpp-source.html">MSApriori_Trie.hpp</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="MSApriori_Trie::MSApriori_Trie" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> MSApriori_Trie::MSApriori_Trie </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const unsigned long&nbsp;</td>          <td class="mdname" nowrap> <em>counter_of_emptyset</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const vector&lt; double &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>mis_abs</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>counter_of_emptyset</em>&nbsp;</td><td>The support of the empty set, i.e. the number of transactions. </td></tr>    <tr><td valign=top><em>mis_abs</em>&nbsp;</td><td>The mis values. </td></tr>  </table></dl><p>Definition at line <a class="el" href="MSApriori__Trie_8cpp-source.html#l00020">20</a> of file <a class="el" href="MSApriori__Trie_8cpp-source.html">MSApriori_Trie.cpp</a>.    </td>  </tr></table><a class="anchor" name="a9" doxytag="MSApriori_Trie::~MSApriori_Trie" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> MSApriori_Trie::~<a class="el" href="classMSApriori__Trie.html">MSApriori_Trie</a> </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="MSApriori__Trie_8cpp-source.html#l00114">114</a> of file <a class="el" href="MSApriori__Trie_8cpp-source.html">MSApriori_Trie.cpp</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="b6" doxytag="MSApriori_Trie::assoc_rule_assist" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void MSApriori_Trie::assoc_rule_assist </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const double&nbsp;</td>          <td class="mdname" nowrap> <em>min_conf</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classTrie.html">Trie</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>Trie</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>consequence_part</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>input_output_manager</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [protected]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="MSApriori__Trie_8cpp-source.html#l00264">264</a> of file <a class="el" href="MSApriori__Trie_8cpp-source.html">MSApriori_Trie.cpp</a>.<p>References <a class="el" href="MSApriori__Trie_8cpp-source.html#l00240">assoc_rule_find()</a>, <a class="el" href="Trie_8hpp-source.html#l00082">Trie::counter</a>, and <a class="el" href="Trie_8hpp-source.html#l00088">Trie::edgevector</a>.<p>Referenced by <a class="el" href="MSApriori__Trie_8cpp-source.html#l00084">association()</a>.    </td>  </tr></table><a class="anchor" name="b5" doxytag="MSApriori_Trie::assoc_rule_find" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void MSApriori_Trie::assoc_rule_find </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const double&nbsp;</td>          <td class="mdname" nowrap> <em>min_conf</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>condition_part</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>consequence_part</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const unsigned long&nbsp;</td>          <td class="mdname" nowrap> <em>union_support</em>, </td>        </tr>        <tr>          <td></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -