Академический Документы
Профессиональный Документы
Культура Документы
154 This work is licensed under Creative Commons Attribution 4.0 International License.
International Journal of Engineering and Management Research e-ISSN: 2250-0758 | p-ISSN: 2394-6962
Volume- 9, Issue- 5 (October 2019)
www.ijemr.net https://doi.org/10.31033/ijemr.9.5.22
ordered fp-tree: values of the two joint pointer fields need to be changed so
Input: a transaction database D with minsup minimum that pc-link points to the parent node and node-link points to
support. the node with the same name, i.e. the next node of the same
Output: ordered fp-tree item.
The transaction database D is scanned to obtain the
support count of frequent items, and the frequent item set is III. WEIGHTED MODEL
obtained. The frequent items are arranged in descending
order according to the support count, which is denoted as L. The project set I = { i1, i2, ..., ik} is a set of k
Create a root node root "null" for ordered fp-tree, different items. The transaction database D={T1, T2,..., Tn},
each transaction in the transaction database T perform the where every transaction Ti(i = 1 , 2, ..., n) contains a unique
following operations: delete the transaction does not meet transaction identifier TID and a subset of I.
the minimum support, the frequent items in descending order Definition 1 Let each item ij(j=1,2,...,k) in item set
support count, with a serial number in the L item - id instead I={i1,i2,...,ik} have a weight W(j), 0<=W(j)<=1. The project
of every frequent items, the serial number to start from 0 item set X also has a corresponding weight, which is
ascending, remember after sorting sequence for [p | p], p for WI ( X ) W ( j ) / | X |
the first element in the sequence, p for other elements. Then recorded as ijX
. The weight of the
call the insert_tree(p| p,root) method. transaction t in the transaction database D is denoted by
The implementation method of ert_tree(p| p,root) is WT (t ) Wij / | t |
ijt
as follows: if root does not have child nodes, remember the . The weighted support for association rule
inserted node is node, then node.item-id=p, node.count=1, A B is denoted as
and the parent pointer node points to root. Otherwise, find
the insertion location of p in the child node of root. If the
W sup(A B) ( WT (t ) / WT (t ))
tT , A B T tT
.
same node node as p is found, the value of node.count will Definition 2 Let the minimum weighted support be
be increased by 1. If the same node is not found, create a Wminsup . If the item set X is a frequent item set, the
new node node, set the values of its various fields, and insert
the node before the next node of p. If P is not null, weighted support is not less than the minimum weighted
insert_tree(P |P,root) is recursively called. support, i.e. W sup(X ) Wminsup .
The following is the transaction database based on Theorem 1 If item sets X and Y are respectively a
table I and the ordered fp-tree constructed by the above subset of I, i.e. X I , Y I and X Y , then
ordered fp-tree construction algorithm, as shown in Figure 1.
TABLE I
W sup(X ) W sup(Y ) .
THE TRANSACTION DATABASE Proof: Let the transaction data set containing X, Y
Transaction Transaction set Ordered transaction set be Tx, Ty, because X Y , for t Ty , there must be
T1 A,C,G A,G,C
t Tx
WT (t ) tT,Y WT
tT , X t
(t )
T2 A,B,E,F A,E,F , so t
,
T3 E,I E W sup(X ) W sup(Y ) can be obtained.
T4 A,D,E,G A,E,G,D
T5 A,C,E,G A,E,G,C Theorem 2 (weighted downward closure property)
T6 A,F,D A,D,F When X I , Y I , X Y and X and Y have the same
prefix, if X is not frequent, Y must be infrequent.
Proof: From theorem 1, we know that
W sup(X ) W sup(Y ) . If X is not frequent, we can know
W sup(X ) W min sup by definition 2. So
W sup(Y ) W min sup , i.e. Y is not frequent.
The weighted model proposed here satisfies the
weighted downward closure property, ensuring that the
subset of frequent item sets is also frequent, and the parent-
set of infrequent item sets is also infrequent, so that frequent
item sets can be merged and infrequent item sets can be
pruned. Applying the weighted model to the weighted
Figure 1: Ordered fp-tree and item entry table association mining algorithm, we can optimize the algorithm
process to mine the weighted frequent item sets.
After the construction of the ordered fp-tree, the
155 This work is licensed under Creative Commons Attribution 4.0 International License.
International Journal of Engineering and Management Research e-ISSN: 2250-0758 | p-ISSN: 2394-6962
Volume- 9, Issue- 5 (October 2019)
www.ijemr.net https://doi.org/10.31033/ijemr.9.5.22
156 This work is licensed under Creative Commons Attribution 4.0 International License.
International Journal of Engineering and Management Research e-ISSN: 2250-0758 | p-ISSN: 2394-6962
Volume- 9, Issue- 5 (October 2019)
www.ijemr.net https://doi.org/10.31033/ijemr.9.5.22
ordered fp-tree is shown in Figure 2. experimental results were shown in Figure 3. The
experimental environment: Windows10 operating system,
8GB of memory, and Pycharm2018 development
environment. The transaction set is generated by python
code for 100,000 transactions, each with a maximum length
of 10.
158 This work is licensed under Creative Commons Attribution 4.0 International License.