📄 readme
字号:
The example files in this directory demonstrate how to use theoptions -b, -f, and -r. This file also explains the conversionscripts, which can convert different input formats into the formatneeded by the fpgrowth program.In the file test1.tab transactions are separated by newline charactersand the items of a transaction are separated by spaces. This is thestandard input format and hence the file can be processed directly: fpgrowth test1.tab test1.outIn the file test2.tab the same transactions can be found, but severaldifferent field separators are used. This file can be processed with: fpgrowth -f ",.;:" -l test2.tab test2.outThe files test3.tab to test5.tab are in formats that cannot beprocessed directly with the fpgrowth program, but which may be common.In the file test3.tab each line contains a transaction identifier andan item, separated by a space. This file can be converted into thestandard input format with the script tid2set, i.e., with tid2set test3.tab x.tabNote, however, that the input file (here: test3.tab) must be sortedw.r.t. the transaction identifier, so that items belonging to thesame transaction occupy consecutive lines/records.In the file test4.tab the first line states the item names and thefollowing lines contain flags T (true) and F (false) depending onwhether the item is contained in the transaction represented by theline or not. This format can be converted into the standard inputformat with the script flg2set, i.e., with flg2set test4.tab x.tabIn the file test5.tab there is one item per line and transactionsare separated by blank lines. This format can be converted into thestandard input format with the script row2set, i.e., with row2set test5.tab x.tabThe additional scripts tab2set and hdr2set convert tables with columnnumbers or column names into a format appropriate for the fpgrowthprogram. They are invoked in the same way as all other scriptsdiscussed above, i.e., with tab2set a.tab b.tabor hdr2set a.tab b.tabwhere a.tab is the name of the input file and b.tab the name of theoutput file. The script tab2set replaces each table entry "x" of theinput file by "Xi=x", where i is the column number (starting with 1).The script hdr2set reads the variable names from the first line ofthe input file and then replaces each table entry "x" by "X=x", where"X" is the variable name that was found in the corresponding columnof the first line. These scripts are handy if you want to processtabular data by treating each table row as a transaction.Note that any input may also be read from standard input and any outputmay be sent to standard output, simply by specifying a '-' or an emptystring "" instead of a filename. For example fpgrowth test1.tab -writes the item sets directly to the terminal. They may be piped toany other program, since all other messages of the fpgrowth program arewritten to standard error.Enjoy,Christian Borgelt
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -