?? readme.txt
字號:
The example files in this directory demonstrate how to use theoptions -b, -f, and -r and the optional item appearances file.This file also explains the conversion scripts, which can convertdifferent input formats into the format needed by the apriori 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: apriori test1.tab test1.rulIn the file test2.tab the same transactions can be found, but severaldifferent field separators are used. This file can be processed with: apriori -f ",.;:" -l test2.tab test2.rulThe files test3.tab to test5.tab are in formats that cannot beprocessed directly with the apriori 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 aprioriprogram. 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.The file test.app demonstrates the use of item appearance indicators.The first line of this file ('body') states that any item not explicitlymentioned in this file may appear only in the body of a rule. The secondline says that item 2 may appear only in the head of a rule. Hence, byprocessing the file test1.tab with apriori test1.tab test.rul test.apponly rules with item 2 in the head are generated.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 apriori test1.tab -writes the rules directly to the terminal. They may be piped to anyother program, since all other messages of the apriori program arewritten to standard error.Enjoy,Christian Borgelt
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -