#include <Input_Output_Manager.hpp>
Public Member Functions | |
Input_Output_Manager (ifstream &basket_file, const char *output_file_name) | |
int | read_in_a_line (set< itemtype > &basket) |
Reads in one transaction from the basketfile. | |
countertype | find_frequent_items (const double min_supp, vector< countertype > &support_of_items) |
Determines the frequent items, fills in the new_code an new_code_inverse vectors. | |
void | basket_recode (const set< itemtype > &original_basket, vector< itemtype > &new_basket) |
Creates an other basket that contains only the frequent items recoded. | |
void | write_out_basket (const set< itemtype > &itemset) |
Writes out an itemset to the output file. | |
void | write_out_basket_and_counter (const set< itemtype > &itemset, const countertype counter) |
Writes out an itemset and its counter to the output file. | |
void | rewind () |
~Input_Output_Manager () | |
Private Attributes | |
ifstream & | basket_file |
The file that contain the transactions (i.e baskets). | |
vector< itemtype > | new_code |
The new codes of the frequent items. | |
vector< itemtype > | new_code_inverse |
The inverse of new_code vector. |
In frequent itemset mining (FIM) algorithms only frequent items are of interest. Hence it is useful to represent frequent items with integers: 1, 2, ..., n, where n is the number of frequent items. In the original transactional database, the items are also represented with integers, so we have to assign new integers to the frequent items.
Definition at line 34 of file Input_Output_Manager.hpp.
|
Definition at line 17 of file Input_Output_Manager.cpp. |
|
Definition at line 158 of file Input_Output_Manager.cpp. |
|
Creates an other basket that contains only the frequent items recoded.
Definition at line 118 of file Input_Output_Manager.cpp. References new_code. Referenced by Apriori::support(). |
|
Determines the frequent items, fills in the new_code an new_code_inverse vectors.
Determining the support of the items Finding the frequent items Definition at line 59 of file Input_Output_Manager.cpp. References countertype, new_code, new_code_inverse, and read_in_a_line(). |
|
Reads in one transaction from the basketfile.
Definition at line 27 of file Input_Output_Manager.cpp. References basket_file, and itemtype. Referenced by find_frequent_items(), and Apriori::support(). |
|
Definition at line 152 of file Input_Output_Manager.cpp. References basket_file. |
|
Writes out an itemset to the output file.
Definition at line 128 of file Input_Output_Manager.cpp. References new_code_inverse. |
|
Writes out an itemset and its counter to the output file.
Definition at line 138 of file Input_Output_Manager.cpp. References new_code_inverse. Referenced by Apriori_Trie::candidate_generation_assist(). |
|
The file that contain the transactions (i.e baskets).
Definition at line 67 of file Input_Output_Manager.hpp. Referenced by read_in_a_line(), and rewind(). |
|
The new codes of the frequent items. if new_code[i] is 0, then i is not frequent, otherwise the new code of item i is new_code[i]-1. Definition at line 74 of file Input_Output_Manager.hpp. Referenced by basket_recode(), and find_frequent_items(). |
|
The inverse of new_code vector. new_code_inverse[new_code[i]-1]=i if i is a frequent item. Definition at line 80 of file Input_Output_Manager.hpp. Referenced by find_frequent_items(), write_out_basket(), and write_out_basket_and_counter(). |