savulionienė, loreta ; sakalauskas, leonidas „modifikuoto stochastinio dažnų posekių paieškos...
DESCRIPTION
Pranešimas XVI kompiuterininkų konferencijos sekcijoje „Duomenų tyryba ir optimizavimas“, „Kompiuterininkų dienos – 2013“, Šiauliai 2013-09-21TRANSCRIPT
Statistical Characteristics of Modified Stochastic Algorithm
Vilnius University
Institute of Mathematics and Informatics Loreta Savulioniene
Structure
• Data mining
• Steps of the Apriori algorithm
• Association rules
• Modified stochastic algorithm for mining frequent subsequences
• Computer Modeling
2
Introduction (1)
Discovering new knowledge consists of some steps: • Data selection;• Data preparation for analysis;• Application of algorithms to discover knowledge;• Presentation of new knowledge.
3
Introduction (2)
• Data mining is research and analysis of large amounts of data using automated or semi-automated methods in order to find important relation between data, discover models and association rules.
• Data mining is defined as the method of acquisition, tracking and discovering of new meanings in data.
4
Introduction (3)
All algorithms used for frequent sequence mining could be classified in two groups: • Exact algorithms;• Approximate algorithms.
5
Apriori algorithm
• Frequent one element itemsets are found in the first step of the Apriori algorithm step.
• Other steps of the algorithm consist of two parts:• generating potentially frequent itemsets;• determining the frequent candidate itemsets.
6
Association rules (1)
Let I={i 1; i2, …, in} be a set of items. Let D be a database of transactions, where each transaction Tconsists of a set of items such that T⊆ I. Given itemset X⊆ I, transaction T contains X if and only if X ⊆ T.Definition 1. An association rule is an implication of the form X⇒Y, where X⊆ I, Y⊆ I and X∩Y=∅ .
Definition 2. The association rule X⇒ Y holds in D with confidence confif the probability of a transaction in D which contains X also contains Y is conf.
7
Association rules (2)
Definition 3. The association rule X⇒Y has support suppin D if the probability of a transaction in D contains both X and Y is supp.Definition 4. Confidence confof the association rule X⇒Y is called a value:
(1)
8
Association rules (3)
Discovering of association rules consists of two steps:
1. Discovering of frequent itemsets.2. Creation of an association rule according to identified
frequent itemsets.
9
Modified stochastic algorithm for mining frequent subsequences (1)
• Let us analyse an M-length database D. • Namely, randomly selected random length l subsets,
containing at least one frequent element, determined by the Apriori algorithm, are analysed.
• Assume that the analysed subset length is distributed according to the geometrical distribution with the parameter q, and the spacing between the two subset lengths is also distributed according to the geometrical distribution with the parameter p.
10
Modified stochastic algorithm for mining frequent subsequences (2)
The average analysed subset length is: l=q/(1-q) (2),
and the average length of the gap between adjacent subsets is equal to:
t=p/(1-p) (3). Let us randomly choose N (number of samples) subsets of various lengths for analysing database D. Subset frequencies ci of the appropriate length are calculated using the following formula (4):ci=Ni /N, where i=1, 2, …, n, (4)
11
Statistical Characteristics of Modified Stochastic Algorithm (1)
12
We have two independent subset samples with their sizes being n1 and n2. In the first sample there occur k1 and in the second -k2 elements with necessary attribute value.
The hypothesis:H0: p1 =p2 (5)H1: p1≠ p2. (6)
Statistical Characteristics of Modified Stochastic Algorithm (2)
13
Criterion Statistics u
Criterion statistics u is estimated according to this formula (7):
.(7) 11
12121
21
21
21
21
+⋅
++
−⋅
++
−=
nnnn
kk
nn
kk
ddu
If d is labeled d = (k1 + k2)/(n1+ n2), the formula is as follows (8):
( ).(8)
111
21
21
+⋅−⋅
−=
nndd
ddu
Statistical Characteristics of Modified Stochastic Algorithm (3)
14
Criterion Statistics z
Criterion statistics z is estimated according to this formula (9):
( ) .(9) arcsin2arcsin221
2121 nn
nnddz
+⋅
⋅−=
Statistical Characteristics of Modified Stochastic Algorithm (4)
15
Assumption Evaluation
After criterion statistics is estimated, assumption of probability evaluation is performed. When alternative is double (H1: p1≠ p2),
the obtained value u, corresponding value P, is calculated as follows (10):
P=2-(l-NORMSDIST(ABS(u))). (10)
Computer Modeling(1)
16
Transaction number Item title Quantity
... ... ...
1001 I 1
1001 J 1
1001 T 1
... ... ...
1002 A 2
1002 C 2
... ... ...
Computer Modeling(2)
17
ABCDEFGHIJKLMPRSTUV
ACEGIKM
ABTUV
..............................
ABCDEF
CDEFGHIJKLMPRST
............
Computer Modeling(3)
18
This file is processed by the modified stochastic algorithm, when 50 ≤ min_supp≤ 600.
The average processing time of the algorithm is 2 min. 20 s.
Computer Modeling(4)
19
Computer Modeling(5)
20
Computer Modeling(6)
21
22
Conclusion
• The modified stochastic algorithm is based on the analysis of randomly chosen subsets, that include at least one frequent element, determined by the Apriori algorithm.
• This algorithm is applied in solving the problem of the market basket.
• The most frequent market basket consists of 6 items.
Thank you!
Questions?
23