|
Public Member Functions |
| Apriori_Trie () |
void | candidate_generation (const itemtype &frequent_size) |
| Generates candidates.
|
void | find_candidate (const vector< itemtype > &basket, const itemtype candidate_size, const unsigned long counter=1) |
| Increases the counter of those candidates that are contained by the given basket.
|
void | delete_infrequent (const unsigned long min_occurrence, const itemtype candidate_size) |
| Deletes unfrequent itemsets.
|
void | association (ofstream &outcomefile, const double min_conf) const |
| Generates association rules.
|
void | basket_recode (vector< itemtype > &basket) const |
| Recodes the basket so that each item is substituted by its s frequency order (inv_orderarray[]).
|
unsigned long | longest_path () const |
| Returns the length of the longest path in the Apriori_Trie.
|
void | write_content_to_file (ofstream &outcomefile) const |
| Writes the content (frequent itemsets) to the file.
|
void | show_content_preorder () const |
| This procedure shows the Apriori_Trie in a preorde.
|
| ~Apriori_Trie () |
Protected Member Functions |
bool | is_all_subset_frequent (const set< itemtype > &maybe_candidate) const |
| Decides if all subset of an itemset is contained in the Apriori_Trie.
|
void | candidate_generation_two () |
| Generates candidate of size two.
|
void | candidate_generation_assist (Trie *Trie, const itemtype distance_from_generator, set< itemtype > &maybe_candidate) |
| Generates candidate of size more than two.
|
void | find_candidate_one (const vector< itemtype > &basket) |
| Increases the counter for those items that are in the given basket.
|
void | find_candidate_two (const vector< itemtype > &basket, const unsigned long counter=1) |
| Increases the counter for those itempairs that are in the given basket.
|
void | delete_infrequent_one (const unsigned long min_occurrence) |
| Deletes the Tries that represent infrequent itemsets of size 1.
|
void | delete_infrequent_two (const unsigned long min_occurrence) |
| Deletes the Tries that represent infrequent itemsets of size 2.
|
void | assoc_rule_find (ofstream &outcomefile, const double min_conf, set< itemtype > &condition_part, set< itemtype > &consequence_part, const unsigned long union_support) const |
void | assoc_rule_assist (ofstream &outcomefile, const double min_conf, Trie *Trie, set< itemtype > &consequence_part) const |
void | write_content_to_file_assist (ofstream &outcomefile, Trie *actual_state, const itemtype distance_from_frequent, set< itemtype > &frequent_itemset) const |
| Writes out the content of the Apriori_Trie (frequent itemset and counters).
|
Protected Attributes |
Trie * | main_trie |
| Trie to store the candidates and the frequent itemsets.
|
vector< vector< unsigned long > > | temp_counter_array |
| temp_counter_array stores the occurences of the itempairs
|
vector< unsigned long > | temp_counter_vector |
vector< itemtype > | orderarray |
| The frequency order of the items.
|
vector< itemtype > | inv_orderarray |
| inverse of orderarray: orderarray[inv_orderarray[i]]=i
|
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.