hider method and natural coding hider method and natural
play

HIDER: Method and Natural Coding HIDER: Method and Natural Coding - PowerPoint PPT Presentation

Workshop Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS ALGORITHMS HIDER: Method and Natural Coding HIDER: Method and Natural Coding Ra l Gir l Gir ldez ldez Ra School of


  1. Workshop Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS ALGORITHMS HIDER: Method and Natural Coding HIDER: Method and Natural Coding Raú úl Gir l Girá áldez ldez Ra School of Engineering - - Division of Computer Science Division of Computer Science School of Engineering Pablo de Olavide University of Seville Pablo de Olavide University of Seville May 15, 2005 – Granada, Spain

  2. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Contents Contents • Introduction • Method • Hybrid Coding • Natural Coding • Experiments • Conclusions • Future and Related Works 2

  3. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Introduction: The context Introduction: The context LEARNING DECISIONS Decision Trees Decision Rules Decision List Knowledge Supervised … LABELED LABELED Learning DATABASE Model DATABASE C4.5 OC1 GABIL GIL Classification Classification SIA N Examples … M Attributes: - Discrete - Continuous Class = {A, B, C} New Example Class = A What is the Class? 3

  4. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Introduction: Preliminaries Introduction: Preliminaries Representations Methods • Decision Trees • Induction • Decision Rules • Evolutionary Algorithms • Fuzzy Rules • Divide & Conquer • etc • etc Hierarchy Hybrid Coding HIDER (Hi erarchical De cision R ules) erarchical De cision R ules) HIDER (Hi HIDER (Hi erarchical De cision R ules) [Aguilar-Riquelme-Toro-03] [Aguilar-Riquelme-Toro-03] Natural Coding Other Improvements [Giraldez-05] [Giraldez-Aguilar-Riquelme-05] HIDER* HIDER* HIDER* [Giraldez-Aguilar-Riquelme-07] 4 [Giraldez-Aguilar-Riquelme-07]

  5. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Introduction: The problem Introduction: The problem HIDER Hybrid Coding HIDER Hybrid Coding HIDER* Natural Coding HIDER* Natural Coding LABELED LABELED DATABASE DATABASE • Coding Evolutionary Individual = Encoded Rule Algorithm • Evaluation HIDER HIDER HIDER F(goals, error, ...) R1: If Cond 11 And Cond 12 And ... Cond 1n Then Class 1 R2: Else If Cond 21 And Cond 22 And ... Cond 2n Then Class 2 Set of ... ... ... ... ... Hierarchical Decision Rm: Else “Unknown Class” Rules a j ∈ [l i , u i ] if a j es continuous Cond ij = a j ∈ {v 1 , v 2 , ...,v k } if a j es discrete 5

  6. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Method: Fitness Function Method: Fitness Function � (r) = N – CE(r) + G(r) + coverage(r) • r is an individual, that is a encoded rule; • N = Number of Examples • CE(r) = Class Error (n. of missclassified examples) • G(r) = Goals (n. of examples correctly classified) • coverage(r) = Space covered by the rule 6

  7. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Method: Algorithm Method: Algorithm E = Training File Procedure HIDER*(E, R) R = Set of Rules R := ∅ r = Rule while |E|>0 ⊕ = Insertion r:=EvoAlg(E) ∆ r = Coverage of r R:=R ⊕ r E:=E-{e ∈ E | e ⊆ ∆ r } End while fin HIDER* Function EvoAlg(E) InitializePopulation(P) for i:=1 to num generations Evaluate(P) next_P:=SelectTheBestOf(P) P = Population next_P:=next P+Replicate(P) next_P:=next P+Recombine(P) P:=next_P end for Evaluate(P) return SelectTheBestOf(P) fin EvoAlg 7

  8. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider: Hybrid Coding I Hider: Hybrid Coding I Binary Coding Real Coding • Suitable for discrete domains • Suitable for continuous domains • Loss of accuracy in continuous domains • Very long size of search space Hybrid Coding (Binary + Real) • Discrete Attributes � Binary Coding • Continuous Attributes � Real Coding Rule: If AT 1 ∈ ∈ [3.9, 5.0] and AT 2 ∈ ∈ ∈ ∈ {red, blue, black} Then Class = 0 ∈ ∈ AT 1 (Real) AT 2 (Binary) Class Hybrid Individual 3.9 5.0 0 1 0 1 1 0 [ Upper , Lower ] {white red green blue black } 8

  9. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider: Hybrid Coding II Hider: Hybrid Coding II Problems : • Real encoding � Very large size of search space • Binary encoding � Length of the individuals Reduction of the search space + Reduction of size of individuals Hider*: Hider*: Hider*: Natural Coding Natural Coding Natural Coding 9

  10. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider*: Natural Coding I Hider*: Natural Coding I Continuous Attributes USD cutpoints = {1.4, 2.5, 3.9, 4.7, 5.0, 6.2} [Giraldez-Aguilar-Riquelme-02] (Very Robust [Aguilar-Bacardit-Divina-04]) Cutpoints 2.5 3.9 4.7 5.0 6.2 1.4 1 ≡ [1.4, 2.5] 2 ≡ [1.4, 3.9] 3 ≡ [1.4, 4.7] 4 ≡ [1.4, 5.0] 5 ≡ [1.4, 6.2] 2.5 - 7 ≡ [2.5, 3.9] 8 ≡ [2.5, 4.7] 9 ≡ [2.5, 5.0] 10 ≡ [2.5, 6.2] 3.9 - - 13 ≡ [3.9, 4.7] 14 ≡ [3.9, 5.0] 15 ≡ [3.9, 6.2] 4.7 - - - 19 ≡ [4.7, 5.0] 20 ≡ [4.7, 6.2] 5.0 - - - - 25 ≡ [5.0, 6.2] Simple Simple • Mutation(x) = Shift: up, down, left or right Genetic Arithmetic Arithmetic Operators • Crossover(x, y) = Intersection between row and column of x and y operations operations Example: 6.2 1.4 2.5 3.9 4.7 5.0 Mutation(14) = {9, 13, 15, 19} Shift up= Mutation(5) = {4, 10} 14 = Extension of the lower bound Crossover(5, 14) = {4, 15} 9 10

  11. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider*: Natural Coding II Hider*: Natural Coding II Discrete Attributes Discrete Values Natural Coding white red green blue black 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 2 Based on ... ... ... ... ... ... Binary Coding 0 1 0 1 1 11 ... ... ... ... ... ... 1 1 1 1 1 31 Genetic • Mutation(x) = Change some bits in x Simple Simple Operators Arithmetic Arithmetic • Crossover(x, y) = {Mutations(x) ⊕ x} ∩ {Mutations(y) ⊕ y} operations Example: operations • 11 = 01011 � Mutations(11) = {10, 9, 15, 3, 27} �� ������ � ��� ∈ ����������� �� ������ � ��� ∈ ������������������� • 19 = 10011 � Mutations(19) = {18, 17, 23, 27, 3} • Crossover(19, 11) = {Mutations(19) ⊕ 19} ∩ {Mutations(11) ⊕ 11} = {3, 27} 11

  12. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider*: Natural Coding III Hider*: Natural Coding III Hybrid Coding vs. Natural Coding • AT 1 (Continuous) AT 2 Example • AT 2 (Discrete) Discrete Values Natural Coding white red green blue black AT 1 0 0 0 0 0 0 Cutpoins 2.5 3.9 4.7 5.0 6.2 0 0 0 0 1 1 1.4 1 2 3 4 5 0 0 0 1 0 2 2.5 - 7 8 9 10 ... ... ... ... ... ... 3.9 - - 13 14 15 0 1 0 1 1 11 4.7 - - - 19 20 ... ... ... ... ... ... 5.0 - - - - 25 1 1 1 1 1 31 Rule: If AT 1 ∈ ∈ [3.9, 5.0] and AT 2 ∈ ∈ {red, blue, black} Then Class = 0 ∈ ∈ ∈ ∈ Hybrid Individual Natural Individual 3.9 5.0 5.0 0 1 0 1 1 0 14 11 0 3.9 0 1 0 1 1 0 14 11 0 AT 1 AT 2 Class AT 1 AT 2 Class 12

  13. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider*: Natural Coding IV Hider*: Natural Coding IV Evaluation: The encoding of examples is carried out to speed up the evaluation process, since to decode all of the rules in each evaluation implies higher computational cost. 13

  14. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Hider*: Natural Coding V Hider*: Natural Coding V ¿Does Natural Coding imply greater computational cost than Hybrid Coding? • The arrays are not stored in memory: – For continuous attributes only the set of cutpoints are stored. Natural Encoding – For discrete attributes only the set does not add of values are stored. computational cost • All the operations are defined as simple algebraic expressions: what's more, it – Encode guarantees the – Decode same ( or better ) – Genetic operators performance (error rate and number of • The encoding of examples is carried rules) with less out to speed up the evaluation process computational cost (See [Aguilar-Giraldez-Riquelme-07]) 14

  15. Workshop KOWLEDGE EXTRACTION BASED ON EVOLUTIONARY ALGORITHMS - Granada 2008 Experiments Experiments • Two kind of experiments [Aguilar-Giraldez-Riquelme-07]: 1. Firstly, the Hybrid Coding (Hider) is compared to the Natural Coding (Hider*). 2. Secondly, the results of the natural coding, C4.5 and C4.5Rules are analyzed, regarding the error rate and the number of rules, by using two sets of datasets: • 16 datasets with standard size (UCI). • 5 large datasets, with several thousands of examples and the number of attributes ranging from 27 to 1558. • 10-fold stratified cross-validation 15

Recommend


More recommend