apriori
Apriori in 

所属分类:C#编程
开发工具:C#
文件大小:308KB
下载次数:10
上传日期:2012-08-15 12:49:54
上 传 者himanshusuperhero
说明:  Alogrithm in the data mining in very useful.

文件列表:
apriori\src (0, 2012-07-04)
apriori\src\istree.h (10321, 2012-05-01)
apriori\src\istree.c (100392, 2012-06-14)
apriori\src\apriori.h (1288, 2012-06-27)
apriori\src\makefile (5951, 2011-12-07)
apriori\src\apriori.mak (4205, 2011-10-19)
apriori\src\apriori.c (56938, 2012-06-14)
apriori\ex (0, 2011-07-19)
apriori\ex\test4.tab (120, 2011-07-26)
apriori\ex\hdr2set (219, 2011-07-26)
apriori\ex\test6.tab (69, 2011-07-26)
apriori\ex\tab2set (144, 2011-07-26)
apriori\ex\rulesort (681, 2011-07-26)
apriori\ex\test.rul (206, 2011-07-26)
apriori\ex\test2.tab (60, 2011-07-26)
apriori\ex\flg2set (243, 2011-07-26)
apriori\ex\test1.tab (60, 2011-07-26)
apriori\ex\xhdr2set (654, 2011-07-26)
apriori\ex\test3.tab (62, 2011-07-26)
apriori\ex\test.app (12, 2011-07-26)
apriori\ex\test5.tab (110, 2011-07-26)
apriori\ex\row2set (169, 2011-07-26)
apriori\ex\tid2set (346, 2011-07-26)
apriori\doc (0, 2011-07-26)
apriori\doc\c_rev.gp (2343, 2011-07-26)
apriori\doc\uparrow.gif (243, 2011-07-26)
apriori\doc\copying (26428, 2011-07-26)
apriori\doc\line.gif (1017, 2011-07-26)
apriori\doc\apriori.tex (4726, 2011-07-26)
apriori\doc\apriori.pdf (102906, 2011-07-26)
apriori\doc\arem.gp (1842, 2011-07-26)
apriori\doc\chi2.tex (5980, 2011-07-26)
apriori\doc\apriori.html (86614, 2011-07-26)
tract\src\tract.c (133715, 2012-07-04)
tract\src\tract.h (23648, 2012-07-04)
tract\src\report.c (73508, 2012-06-27)
tract\src\report.h (14695, 2012-05-31)
tract\src\makefile (6334, 2011-12-01)
tract\src\tract.mak (3871, 2011-11-24)
... ...

The example files in this directory demonstrate how to use the options -w, -r, -f, and -b. This file also explains the conversion scripts, which can convert different input formats into the format needed by the apriori program. In the file test1.tab transactions are separated by newline characters and the items of a transaction are separated by spaces. This is the standard input format and hence the file can be processed directly: apriori test1.tab test1.out In the file test2.tab the same transactions can be found, but several different field separators are used. This file can be processed with: apriori -f ",.;:" -l test2.tab test2.out The file test3.tab has basically the same format as the file test1.tab, with the only difference that the last fields of each record states an (integer) transaction weight. This allows us to combine transactions, so that test2.tab has only 8 lines, while test1.tab has 10 lines, because the transactions "a b c" and "a b c d" occur twice. In order to instruct the program to interpret the last field of each record as such a weight, is has to be invoked with the option -w: apriori -w test3.tab test3.out The files test4.tab to test6.tab are in formats that may be common, but which cannot be processed directly with the apriori program. In the file test4.tab each line contains a transaction identifier and an item, separated by a space. This file can be converted into the standard input format with the script tid2set, i.e., with tid2set test4.tab x.tab Note that in this script the input file (here: test4.tab) is sorted w.r.t. the transaction identifier, so that items belonging to the same transaction occupy consecutive lines/records. In the file test5.tab the first line states the item names and the following lines contain flags T (true) and F (false) depending on whether the item is contained in the transaction represented by the line or not. This format can be converted into the standard input format with the script flg2set, i.e., with flg2set test5.tab x.tab In the file test5.tab there is one item per line and transactions are separated by blank lines. This format can be converted into the standard input format with the script row2set, i.e., with row2set test5.tab x.tab The additional scripts tab2set and hdr2set convert tables with column numbers or column names into a format appropriate for the apriori program. They are invoked in the same way as all other scripts discussed above, i.e., with tab2set a.tab b.tab or hdr2set a.tab b.tab where a.tab is the name of the input file and b.tab the name of the output file. The script tab2set replaces each table entry "x" of the input file by "Xi=x", where i is the column number (starting with 1). The script hdr2set reads the variable names from the first line of the input file and then replaces each table entry "x" by "X=x", where "X" is the variable name that was found in the corresponding column of the first line. These scripts are handy if you want to process tabular data by treating each table row as a transaction. Note that any input may also be read from standard input and any output may be sent to standard output, simply by specifying a '-' or an empty string "" instead of a filename. For example cat test1.tab | apriori - - reads the transactions from standard input (where they are fed by the cat command) and writes the item sets directly to the terminal. They may be piped to any other program or script, since all other messages of the apriori program are written to standard error. The file test.app demonstrates the use of item appearance indicators. The first line of this file ('body') states that any item not explicitly mentioned in this file may appear only in the body of a rule. The second line says that item 2 may appear only in the head of a rule. Hence, by processing the file test1.tab with apriori test1.tab test.rul test.app only rules with item 2 in the head are generated. Enjoy, Christian Borgelt

近期下载者

相关文件


收藏者