apriori
所属分类:人工智能/神经网络/深度学习
开发工具:C/C++
文件大小:201KB
下载次数:35
上传日期:2010-09-23 17:00:32
上 传 者:
irstar1489
说明: Apriori算法【l】:1994年由R.Agrawal等人提出来的Apriori算法是
关联规则挖掘的一个经典算法,后来的许多算法都是基于该算法的思想。算
法的名称来源于在算法中应用了频繁项集的先验知识,即:一个频繁项集的
任一非空子集必定是频繁项集;因此只要某一项集是非频繁的,则其超集就
无须再检验。
(Apriori algorithm】 【l: 1994 by R. Agrawal et al to the Apriori algorithm is a classical association rule mining algorithm, and later many of the algorithms are based on the idea of the algorithm. The name comes from the algorithm applied in the algorithm a priori knowledge of frequent item sets, ie: any of a frequent itemset must be a non-empty subset of frequent item sets so long as a particular set of non-frequent, its superset to no longer need to test.)
文件列表:
apriori\src\makefile (5174, 2010-08-29)
apriori\src\apriori.mak (3764, 2010-08-22)
apriori\src\istree.c (97564, 2010-08-31)
apriori\src\apriori.dsp (3411, 2010-09-23)
apriori\src\Debug\vc60.idb (33792, 2010-09-23)
apriori\src\Debug\vc60.pdb (28672, 2010-09-23)
apriori\src\apriori.ncb (33792, 2010-09-23)
apriori\src\apriori.plg (10198, 2010-09-23)
apriori\src\apriori.c (40217, 2010-09-23)
apriori\src\istree.h (10672, 2010-09-23)
apriori\src\apriori.opt (48640, 2010-09-23)
apriori\src\apriori.dsw (522, 2010-09-23)
apriori\ex\hdr2set (219, 2009-12-08)
apriori\ex\test1.tab (60, 2009-10-26)
apriori\ex\xhdr2set (654, 2009-12-08)
apriori\ex\row2set (169, 2009-12-08)
apriori\ex\test2.tab (60, 2009-10-26)
apriori\ex\test4.tab (110, 2009-10-26)
apriori\ex\test.app (12, 2009-10-26)
apriori\ex\tab2set (144, 2009-12-08)
apriori\ex\rulesort (681, 2009-10-26)
apriori\ex\test5.tab (69, 2009-10-26)
apriori\ex\test.rul (206, 2009-10-26)
apriori\ex\flg2set (243, 2009-12-08)
apriori\ex\tid2set (339, 2009-12-08)
apriori\ex\test3.tab (120, 2009-10-26)
apriori\doc\chi2.aux (8, 2010-08-20)
apriori\doc\c_rev.gp (2343, 2009-10-26)
apriori\doc\line.gif (1017, 2009-10-26)
apriori\doc\chi2.tex (5980, 2009-10-26)
apriori\doc\uparrow.gif (243, 2009-10-26)
apriori\doc\chi2.pdf (132618, 2010-08-20)
apriori\doc\chi2.log (3720, 2010-08-20)
apriori\doc\apriori.html (86330, 2010-03-02)
apriori\doc\arem.gp (1842, 2009-10-26)
apriori\doc\copying (26428, 2009-10-26)
apriori\src\Debug (0, 2010-09-23)
apriori\src (0, 2010-09-07)
apriori\ex (0, 2010-08-20)
... ...
The example files in this directory demonstrate how to use the
options -b, -f, and -r and the optional item appearances file.
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.rul
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.rul
The files test3.tab to test5.tab are in formats that cannot be
processed directly with the apriori program, but which may be common.
In the file test3.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 test3.tab x.tab
Note, however, that the input file (here: test3.tab) must be sorted
w.r.t. the transaction identifier, so that items belonging to the
same transaction occupy consecutive lines/records.
In the file test4.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 test4.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.
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.
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
apriori test1.tab -
writes the rules directly to the terminal. They may be piped to any
other program, since all other messages of the apriori program are
written to standard error.
Enjoy,
Christian Borgelt
近期下载者:
相关文件:
收藏者: