Presentation is loading. Please wait.

Presentation is loading. Please wait.

Association Action Rules b y Zbigniew W. Ras 1,5 Agnieszka Dardzinska 2 Li-Shiang Tsay 3 Hanna Wasyluk 4 1)University of North Carolina, Charlotte, NC,

Similar presentations


Presentation on theme: "Association Action Rules b y Zbigniew W. Ras 1,5 Agnieszka Dardzinska 2 Li-Shiang Tsay 3 Hanna Wasyluk 4 1)University of North Carolina, Charlotte, NC,"— Presentation transcript:

1 Association Action Rules b y Zbigniew W. Ras 1,5 Agnieszka Dardzinska 2 Li-Shiang Tsay 3 Hanna Wasyluk 4 1)University of North Carolina, Charlotte, NC, USA 2)Bialystok Technical University, Bialystok, Poland 3)North Carolina A&T State Univ., Greensboro, USA 4)Medical Center of Postgraduate Education, Warsaw, Poland 5)Polish-Japanese Institute of Information Technology, Warsaw, Poland

2 Example Xabcd x1x1x1x1 a1a1a1a1 b1b1b1b1 c1c1c1c1 d1d1d1d1 x2x2x2x2 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x3x3x3x3 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x4x4x4x4 a2a2a2a2 b2b2b2b2 c2c2c2c2 d2d2d2d2 x5x5x5x5 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x6x6x6x6 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x7x7x7x7 a2a2a2a2 b1b1b1b1 c2c2c2c2 d2d2d2d2 x8x8x8x8 a1a1a1a1 b2b2b2b2 c2c2c2c2 d1d1d1d1 (a, a 2 ) (b, b 1 → b 2 ) (c, c 2 ) (d, d 1 → d 2 ) Information System S r=[(a, a 2 )  (b, b 1 → b 2 )] → (d, d 1 → d 2 ) action rule Dom (r) = {a, b, d}

3 Generating Frequent Action Sets (Apriori) S = (X, A, V ) – information system λ 1 – minimum support t a - atomic action term, where N S (t a ) = [Y 1, Y 2 ] and a  A. t a – FREQUENT, if card(Y 1 ) ≥ λ 1 and card(Y 2 ) ≥ λ 1

4 Generating Frequent Action Sets (Apriori) S=(X, A, V ) – information system λ 1 – minimum support t a - an atomic action set, where N S (t a ) = [Y 1, Y 2 ] and a  A. 1.Merging Step: Merge pairs (t 1, t 2 ) of frequent k-element action sets into (k + 1)-element candidate action set if all elements in t 1 and t 2 are the same except the last elements. Example: If (a, a 1  a 2 ). (b, b 1  b 2 ), (a, a 1  a 2 ). (c, c 2  c 1 ) are frequent, then (a, a 1  a 2 ). (b, b 1  b 2 ). (c, c 2  c 1 ) is a candidate action set. It is frequent if c  b and its support is not smaller than λ 1.

5 Generating Frequent Action Sets (Apriori) S=(X, A, V ) – information system λ 1 – minimum support t a - an atomic action set, where N S (t a ) = [Y 1, Y 2 ] and a  A. 1. Merging Step: Merge pairs (t 1, t 2 ) of frequent k-element action sets into (k + 1)-element candidate action set if all elements in t 1 and t 2 are the same except the last elements. 2. Pruning Step: Delete each (k + 1)-element candidate action set t if either some k-element subset of t is not frequent or t is not frequent. Example: If (a, a 1  a 2 ). (b, b 1  b 2 ). (c, c 2  c 1 ) is a candidate action set, then check if (b, b 1  b 2 ). (c, c 2  c 1 ), (a, a 1  a 2 ). (c, c 2  c 1 ), (a, a 1  a 2 ). (b, b 1  b 2 ) are all frequent.

6 Generating Frequent Action Sets (Apriori) S=(X, A, V ) – information system λ 1 – minimum support t a - an atomic action set, where N S (t a ) = [Y 1, Y 2 ] and a  A. 1. Merging Step: Merge pairs (t 1, t 2 ) of frequent k-element action sets into (k + 1)-element candidate action set if all elements in t 1 and t 2 are the same except the last elements. 2. Pruning Step: Delete each (k + 1)-element candidate action set t if either t is not an action set or some k-element subset of t is not a frequent k-element action set. If t is (k + 1)-element candidate action set, all attributes listed in t are different, N S (t) = [Y 1, Y 2 ], and Card(Y 1 ) ≥ λ 1 and Card(Y 2 ) ≥ λ 1 then t is a frequent (k + 1)-element action set.

7 Generating Association Action Rules S=(X, A, V ) – information system λ 1 – minimum support & λ 2 – minimum confidence Definition: t – is a frequent action set in S, if t is frequent k-element action set in S, for some k. Notation:  [t - t 1 ] - action set containing all atomic action sets listed in t but not listed in t 1.  AAR S ( λ 1, λ 2 ) - set of association action rules in S satisfying both thresholds λ 1, λ 2 for minimum support and minimum confidence.

8 Generating Association Action Rules S=(X, A, V ) – information system λ 1 – minimum support & λ 2 – minimum confidence Definition: t – is a frequent action set in S, if t is frequent k-element action set in S, for some k. Notation:  [t - t 1 ] - action set containing all atomic action sets listed in t but not listed in t 1.  AAR S ( λ 1, λ 2 ) - set of association action rules in S satisfying both thresholds λ 1, λ 2 for minimum support and minimum confidence. Construction: t - frequent action set in S and t 1 is its subset. Any action rule r = [(t-t 1 ) → t 1 ] is an association action rule in AARS( λ 1, λ 2 ), if conf(r) ≥ λ 2.

9 Association Action Rules, Example Xabcd x1x1x1x1 a1a1a1a1 b1b1b1b1 c1c1c1c1 d1d1d1d1 x2x2x2x2 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x3x3x3x3 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x4x4x4x4 a2a2a2a2 b2b2b2b2 c2c2c2c2 d2d2d2d2 x5x5x5x5 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x6x6x6x6 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x7x7x7x7 a2a2a2a2 b1b1b1b1 c2c2c2c2 d2d2d2d2 x8x8x8x8 a1a1a1a1 b2b2b2b2 c2c2c2c2 d1d1d1d1 Stable: a, c λ 1 =2, λ 2 =4/9 Frequent Atomic Action Sets: (a, a 1 ) – support 2 (a, a 2 ) – support 6 (b, b 1 ) – support 4 (b, b 2 ) – support 4 (b, b 1 →b 2 ) – support 4 (b, b 2 →b 1 ) – support 4 (c, c 1 ) – support 5 (c, c 2 ) – support 3 (d, d 1 ) – support 4 (d, d 2 ) – support 4 (d, d 1 →d 2 ) – support 4 (d, d 2 →d 1 ) – support 4

10 Association Action Rules, Example Xabcd x1x1x1x1 a1a1a1a1 b1b1b1b1 c1c1c1c1 d1d1d1d1 x2x2x2x2 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x3x3x3x3 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x4x4x4x4 a2a2a2a2 b2b2b2b2 c2c2c2c2 d2d2d2d2 x5x5x5x5 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x6x6x6x6 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x7x7x7x7 a2a2a2a2 b1b1b1b1 c2c2c2c2 d2d2d2d2 x8x8x8x8 a1a1a1a1 b2b2b2b2 c2c2c2c2 d1d1d1d1 Stable: a, c λ 1 =2, λ 2 =4/9 Frequent Action Sets: (a, a 1 )  (b, b 1 ) – support 1 not frequent (a, a 1 )  (b, b 2 ) – support 1 not frequent (a, a 1 )  (b, b 1 →b 2 ) – support 1 not frequent (a, a 1 )  (b, b 2 →b 1 ) – support 1 not frequent (a, a 1 )  (c, c 1 ) – support 1 not frequent (a, a 1 )  (c, c 2 ) – support 1 not frequent (a, a 1 )  (d, d 1 ) – support 2 (a, a 1 )  (d, d 2 ) – support 0 not frequent (a, a 1 )  (d, d 1 →d 2 ) – support 0 not frequent (a, a 1 )  (d, d 2 →d 1 ) – support 0 not frequent

11 6. Association Action Rules, Example Xabcd x1x1x1x1 a1a1a1a1 b1b1b1b1 c1c1c1c1 d1d1d1d1 x2x2x2x2 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x3x3x3x3 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x4x4x4x4 a2a2a2a2 b2b2b2b2 c2c2c2c2 d2d2d2d2 x5x5x5x5 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x6x6x6x6 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x7x7x7x7 a2a2a2a2 b1b1b1b1 c2c2c2c2 d2d2d2d2 x8x8x8x8 a1a1a1a1 b2b2b2b2 c2c2c2c2 d1d1d1d1 Stable: a, c λ 1 =2, λ 2 =4/9 Frequent Action Sets: (a, a 2 )  (b, b 1 ) – support 3 (a, a 2 )  (b, b 2 ) – support 3 (a, a 2 )  (b, b 1 →b 2 ) – support 3 (a, a 2 )  (b, b 2 →b 1 ) – support 3 (a, a 2 )  (c, c 1 ) – support 4 (a, a 2 )  (c, c 2 ) – support 2 (a, a 2 )  (d, d 1 ) – support 2 (a, a 2 )  (d, d 2 ) – support 4 (a, a 2 )  (d, d 1 →d 2 ) – support 2 (a, a 2 )  (d, d 2 →d 1 ) – support 2

12 Association Action Rules, Example Xabcd x1x1x1x1 a1a1a1a1 b1b1b1b1 c1c1c1c1 d1d1d1d1 x2x2x2x2 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x3x3x3x3 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x4x4x4x4 a2a2a2a2 b2b2b2b2 c2c2c2c2 d2d2d2d2 x5x5x5x5 a2a2a2a2 b1b1b1b1 c1c1c1c1 d1d1d1d1 x6x6x6x6 a2a2a2a2 b2b2b2b2 c1c1c1c1 d2d2d2d2 x7x7x7x7 a2a2a2a2 b1b1b1b1 c2c2c2c2 d2d2d2d2 x8x8x8x8 a1a1a1a1 b2b2b2b2 c2c2c2c2 d1d1d1d1 Stable: a, c λ 1 =2, λ 2 =4/9 Frequent Action Sets: …………. …….…… (a, a 2 )  (b, b 1 →b 2 )  (c, c 1 )  (d, d 1 →d 2 ) – - support 2 Association action rules can be constructed from frequent action sets. We can construct association action rule: [(a, a 2 )·(b, b 1 → b 2 )] → [(c, c 1 )·(d, d 1 → d 2 )] Confidence: 4/9

13 Simple Association Action Rules (a, a 1 → a 2 ) - atomic action set cost((a, a 1 → a 2 )) - cost of action expecting to change value of attribute a from a 1 to a 2. t 1 = (a, a 1 → a 2 ), t 2 = (b, b 1 → b 2 ) - two atomic action sets t 1, t 2 are positively correlated if changes t 1, t 2 support each other Change t 1 implies change t 2 and t 2 implies change t 1.

14 Simple Association Action Rules Definition: Let t = t 1  t 2  …  t m is a frequent action set, where each t i - atomic action set. Let T = {t 1, t 2,…, t m } and: t i ~t j iff t i and t j are positively correlated. Equivalence relation, partitions T into equivalence classes (T = T 1  T 2  …  T k )

15 Simple Association Action Rules Definition: Let t = t 1  t 2  …  t m is a frequent action set, where each t i - atomic action set. Let T = {t 1, t 2,…, t m } and: t i ~t j iff t i and t j are positively correlated. Now: In each equivalence class T i, an atomic action set a(T i ) of the lowest cost is identified. The cost of t is defined as: cost(t) = ∑{cost(a(T i )): 1≤ i ≤ k}

16 Simple Association Action Rules Definition: Let t = t 1  t 2  …  t m is a frequent action set, where each t i - atomic action set. Let T = {t 1, t 2,…, t m } and: t i ~t j iff t i and t j are positively correlated. Now: The cost of t is defined as: cost(t) = ∑{cost(a(T i )): 1≤ i ≤ k} a(T 1 )  a(T 2 )  …  a(T k ) → [t – {a(T i ): 1  i  k}] - simple association action rule.

17 Simple Association Action Rules Definition: Let t = t 1  t 2  …  t m is a frequent action set, where each t i - atomic action set. Let T = {t 1, t 2,…, t m } and: t i ~t j iff t i and t j are positively correlated. Now: The cost of t is defined as: cost(t) = ∑{cost(a(T i )): 1≤ i ≤ k} r = [ a(T 1 )  a(T 2 )  …  a(T k ) → [t – {a(T i ): 1  i  k}] ] - simple association action rule. The cost of r is defined as the cost of a(T 1 )  a(T 2 )  …  a(T k )

18 Simple Association Action Rules Algorithm generating simple association action rules: User gives three threshold values: λ 1 - minimum support, λ 2 - minimum confidence, λ 3 - maximum cost. Strategy similar to Apriori [atomic action sets are ordered with respect to cost increase]

19 Thank You Questions?


Download ppt "Association Action Rules b y Zbigniew W. Ras 1,5 Agnieszka Dardzinska 2 Li-Shiang Tsay 3 Hanna Wasyluk 4 1)University of North Carolina, Charlotte, NC,"

Similar presentations


Ads by Google