1 learning classifier systems andrew cannon angeline honggowarsito 1

64
1 Learning Classifier Learning Classifier Systems Systems Andrew Cannon Angeline Honggowarsito 1

Upload: clementine-alisha-roberts

Post on 11-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

1

Learning Classifier Learning Classifier SystemsSystemsAndrew Cannon

Angeline Honggowarsito

1

Page 2: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

2

Introduction to LCS / LCS Metaphor The Driving Mechanism

◦ Learning◦ Evolution

Minimal Classifier System Michigan VS Pittsburgh

Categories of LCS Optimisation Application: data mining

ContentsContents

Page 3: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

IntroductionIntroduction Our world is a Complex System

◦ Interconnected parts◦ Properties exhibited by collective parts

might be different from individual parts Adaptive

◦ Capacity to change and learn from experience

3

Page 4: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

IntroductionIntroduction John Holland in 1975

◦ New York city, as a system that exists in a steady state of operation, made up of “buyers, sellers, administrations, streets, bridges, and buildings that are always changing. Like the standing wave in front of a rock in a fast-moving stream, a city is a pattern in time.”

4

Page 5: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

5

Rule-Based AgentsRule-Based Agents Represented by rule-based agents.◦ Agents - Single Components IF condition THEN action Use system’s environment information to

make decision

Page 6: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

MetaphorMetaphor Two biological Metaphors:

◦ Evolution◦ Learning

Genetic Algorithm & Learning Mechanism

Environment of the system Example

◦ Robots navigating maze environment

6

Page 7: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

The Driving MechanismThe Driving Mechanism Discovery - The Genetic Algorithm

◦ Rule Discovery◦ Apply Genetic Algorithm

The fitness function quantifies the optimality of a given rule

◦ Classification Accuracy most widely used as metric of fitness

7

Page 8: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

The Driving MechanismThe Driving Mechanism Learning

◦ “The improvement of performance in some environment through the acquisition of knowledge resulting from experience in that environment.”

◦ Each classifier has one or more parameters◦ Iteratively update the parameters

8

Page 9: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

LearningLearning Purposes:

◦ Identify useful classifiers◦ Discovery of better rules

Different problem domains require different styles of learning.

Learning based on the information provided◦ Batch Learning

Training instances presented simultaneously. End result: rule set that does not change

with respect to time.

9

Page 10: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

LearningLearning Incremental learning

◦ One training instances at a time◦ End result:

Rule set that changes continuously Learning based on type of feedback

◦ Supervised Learning◦ Reinforcement Learning

10

Page 11: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Minimal Classifier SystemMinimal Classifier System Basic LCS Implementation Developed by Larry Bull Advancing LCS theory Designed to understand more complex

implementations, instead of solving real world problems.

11

Page 12: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Minimal Classifier SystemMinimal Classifier System

12

Page 13: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Minimal Classifier SystemMinimal Classifier System

Input Data◦ 4 Digit binary Number

Learning Iteratively, one instance at a time

Population [N]◦ Condition {C}◦ Action {A}◦ Fitness Parameter {F}

Population is randomly initialized

13

Page 14: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

PopulationPopulation

Condition◦ String of “0, 1, #”◦ 00#1 matches 0011 or 0001

Action◦ Which action is possible (0 or 1)

Fitness Parameter◦ How good is the classifier

C A F00#1 1 880##1 0 17#010 1 34001# 1 910#11 0 6611#0 0 7

0011

14

Page 15: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Match SetMatch Set Population Scanned Match Set : List of rules whose

condition matches the input string at each position

Input = 0011 C A F00#1 1 880##1 0 17#010 1 34001# 1 910#11 0 6611#0 0 7

C A F

00#1 1 88

0##1 0 17

001# 1 91

0#11 0 66Population Match set

15

Page 16: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Action SetAction Set Action Set established using

explore/exploit scheme by alternating between:◦ Select action found in M (Explore)◦ Select deterministically with prediction

arrayC A F

00#1 1 88

0##1 0 17

001# 1 91

001# 0 66

00#1

1 88

001#

1 91

Action 1 179Action 0 83

Match setAction set

Prediction array

16

Page 17: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Minimal Classifier SystemMinimal Classifier System Prediction array: List of prediction values

calculated for each action Prediction value: sum of fitness values

found in the subset of M advocating the same action

Learning starts when the reward is received

17

Page 18: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Michigan VS PittsburghMichigan VS Pittsburgh

Holland proposed Michigan style Pittsburgh was proposed by Kenneth

Dejong and his student Main Distinction between two

approaches:◦ Individuals structure◦ Problem solving structure◦ Individuals competition/competitors◦ Online VS offline learning

18

Page 19: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Michigan VS PittsburghMichigan VS Pittsburgh

Structure of the individual◦ Michigan, each individual is a classifier,

entire population is the problem solution◦ Pittsburgh, each individual is a set of

classifiers representing a solution Individual competition / cooperation

◦ Michigan, apply individual competition◦ Pittsburgh, apply individual cooperation

19

Page 20: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

Michigan VS PittsburghMichigan VS Pittsburgh Offline / Online Learning

◦ Michigan apply online or offline learning, while Pittsburgh apply offline learning

Problem solution◦ Michigan, distribute problem solution◦ Pittsburgh, compact problem solution

20

Page 21: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

21

Sigaud, O & Wilson, SW 2007, ‘Learning classifier systems: a survey’, Soft Computing, vol. 11, no. 11, pp. 1065-1078.

Urbanowicz, RJ & Moore, JH 2009, ‘Learning Classifier Systems: A Complete Introduction, Review and Roadmap’, Journal of Artificial Evolution and Applications, vol. 2009, 25 pages.

SourcesSources

Page 22: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

22

Categories of LCS◦ Strength based (ZCS)◦ Accuracy based (XCS)◦ Anticipation based (ALCS)

Optimisation Application: data mining

ContentsContents

Page 23: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

23

Zeroth level classifier systems (ZCS) Introduced by Wilson in 1994

Strength based (ZCS)Strength based (ZCS)

Page 24: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

24

Zeroth level classifier systems (ZCS) Introduced by Wilson in 1994

Strength based (ZCS)Strength based (ZCS)

Fixed size population of rules

Page 25: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

25

Rules maps conditions to actions

Strength based (ZCS)Strength based (ZCS)

Condition → Action

Page 26: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

26

Rules map conditions to actions

Fitness is the predicted accumulated reward (initialised to some value S0)

Strength based (ZCS)Strength based (ZCS)

Condition → Action Fitness

Page 27: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

27

Strength based (ZCS)Strength based (ZCS)

Match set M

Stimuli

Page 28: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

28

Select an action from M via roulette wheel selection

Strength based (ZCS)Strength based (ZCS)

Match set M

P(rule) = Fitness(rule) / (sum of fitnesses of all rules in M)

Page 29: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

29

All the rules in M that advocated the action from the selected rule become the action set A

Strength based (ZCS)Strength based (ZCS)

Action set A

Page 30: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

30

Distribute rewards

First reward classifiers from the previous step1. Take the sum of fitnesses of rules in the current

action set A2. Multiple by discount factor γ and learning factor

α3. Distribute equally among the members of the

action set from the previous step

Strength based (ZCS)Strength based (ZCS)

Page 31: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

31

Distribute rewards

Then receive a reward from the environment as a result of executing the current action1. Multiply the reward received from the

environment by learning rate α2. Distribute equally among the members of the

current action set

Strength based (ZCS)Strength based (ZCS)

Page 32: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

32

Penalise other members of the match set

Multiple the fitness of each member of the current match set that is not contained in the current action set (M\A) by tax τ

Strength based (ZCS)Strength based (ZCS)

Page 33: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

33

At each step, a genetic algorithm is run with probability p

Two members of the global rule population are selected via roulette wheel selection

Two offspring are produced via one point crossover and mutation with fitnesses given by the average fitness of their parents

Two members of the global population are deleted via roulette wheel selection based on inverse fitnesses

Strength based (ZCS)Strength based (ZCS)

Page 34: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

34

Run a covering operator if no rules match the environmental stimuli (match set M is empty) or if every rule in the match set has fitness equal to or less than some fraction Ф of the population average

Create a new rule with random action and average fitness that fires under the current stimuli (possibly generalised). Replace an existing rule selected via roulette wheel selection based on inverse fitness

Strength based (ZCS)Strength based (ZCS)

Page 35: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

35

Suggested parameters (Bull and Hurst 2002)◦ Population size of 400◦ Initial rule fitness S0 = 20.0◦ Learning rate α = 0.2◦ Discount factor γ = 0.71◦ Tax τ = 0.1◦ Genetic algorithm run with probability p = 0.25◦ Cover operating firing fraction Ф = 0.5

Strength based (ZCS)Strength based (ZCS)

Page 36: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

36

May not fully represent problem space

ZCS DisadvantagesZCS Disadvantages

Page 37: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

37

Extended classifier system Most studied and widely used family of LCS

Each rule predicts a particular reward (and error)

Each rule has a particular fitness Retain rules that predict lower rewards as

long as those predictions are accurate

Accuracy based (XCS)Accuracy based (XCS)

Page 38: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

38

Population of rules (initially empty but bounded to some size P) specifying actions in response to conditions

Match set formed in response to stimuli from environment

Action selected from match set◦ Highest fitness◦ Roulette wheel selection◦ Alternation between exploration and exploitation

Rules advocating the same action form the action set

Accuracy based (XCS)Accuracy based (XCS)

Page 39: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

39

Receive a reward r from the environment for executing the specified action

Update the predicted reward for each rule in the action set◦ p ← p + β (r-p)

Update the predicted error for each rule in the action set◦ ε ← ε + β (|r-p| - ε)

◦ β = estimation rate

Accuracy based (XCS)Accuracy based (XCS)

Page 40: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

40

If ε < ε0, set prediction accuracy k=1 Otherwise, set prediction accuracy

◦ k = α(ε0/ε)v for some α,v>0 Calculate relative prediction accuracy

◦ k’ = k(rule) / (sum of k for all rules in action set) Update the fitness of each rule

◦ f ← f + β (k’ - f)

◦ α = learning rate◦ β = estimation rate

Accuracy based (XCS)Accuracy based (XCS)

Page 41: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

41

Run genetic algorithm to introduce diversity and increase fitness of population

Run every θGA time steps Run on members of action set (rather than

members of global population) Favours accurate classifiers Two parents selected via roulette wheel

selection (based on fitness) produce two offspring via mutation and crossover

Accuracy based (XCS)Accuracy based (XCS)

Page 42: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

42

Covering operator adds new rules when no rules match the current environmental condition (possibly generalised)

If the population exceeds its bounded size, the requisite number of rules are deleted via roulette wheel selection based on the average size of the action sets containing each rule

Accuracy based (XCS)Accuracy based (XCS)

Page 43: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

43

Sometimes, when a new rule is added, it is checked whether or not a more general rule already exists – if it does, another copy of the more general rule is added instead of the more specific rule

Favours generalisation Computationally expensive

Accuracy based (XCS)Accuracy based (XCS)

Page 44: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

44

Suggested parameters (Butz and Wilson 2002)◦ Maximum population size P=800 or P=2000◦ Learning rate α = 0.1◦ Estimation rate β = 0.2◦ Genetic algorithm run every θGA = 25 time steps

Accuracy based (XCS)Accuracy based (XCS)

Page 45: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

45

Anticipatory learning classifier systems

Anticipate the effect of taking a particular action under a particular condition

Optimise accuracy of predicted effects

Anticipation based (ALCS)Anticipation based (ALCS)

(Condition, Action) → Effect

Page 46: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

46

Effects might specify that after taking an action (in a specific state) that particular environmental variables might stay the same (=), adopt a particular value or cannot be predicted (?)

Anticipation based (ALCS)Anticipation based (ALCS)

Page 47: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

47

For example, the rule [##1][a] → [1?=]

would predict that after taking action a in a state matching the condition ##1, that the first environment variable is 1, the second cannot be predicted while the third does not change

Anticipation based (ALCS)Anticipation based (ALCS)

Page 48: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

48

For example, the rule [##1][a] → [1?=]

would predict that after taking action a in a state matching the condition ##1, that the first environment variable is 1, the second cannot be predicted while the third does not change

Anticipation based (ALCS)Anticipation based (ALCS)

Page 49: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

49

For example, the rule [##1][a] → [1?=]

would predict that after taking action a in a state matching the condition ##1, that the first environment variable is 1, the second cannot be predicted while the third does not change

Anticipation based (ALCS)Anticipation based (ALCS)

Page 50: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

50

For example, the rule [##1][a] → [1?=]

would predict that after taking action a in a state matching the condition ##1, that the first environment variable is 1, the second cannot be predicted while the third does not change

Anticipation based (ALCS)Anticipation based (ALCS)

Page 51: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

51

For example, the rule [##1][a] → [1?=]

would predict that after taking action a in a state matching the condition ##1, that the first environment variable is 1, the second cannot be predicted while the third does not change

Anticipation based (ALCS)Anticipation based (ALCS)

Page 52: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

52

In a grid based maze, if there is a wall to the North of an agent, moving North will result in no environmental variables changing

If there is a wall to the North of an agent and no wall to the East of an agent, moving East will result in there being a wall to the North West of the agent

Anticipation based (ALCS)Anticipation based (ALCS)

Page 53: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

53

Apply heuristics to specialise or generalise classifiers

May favour exploration over exploitation to be able to efficiently explore the problem space

Anticipation based (ALCS)Anticipation based (ALCS)

Page 54: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

54

In practice, seek to optimise◦ Performance (quality of solution)◦ Scalability◦ Adaptability◦ Speed

Ideal rule set is◦ Correct◦ Complete◦ Compact/minimal◦ Non-overlapping

OptimisationOptimisation

Page 55: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

55

Kharbat, Odeh and Bull 2008

Perform data mining from a breast cancer data set to aid in diagnosis

Application: data miningApplication: data mining

Page 56: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

56

UK health trust had a data set on breast cancer patients

Early diagnosis is very important Seek to find patterns to aid in diagnosis Each patient represented by 45 attributes

that may be binary, categorical or real valued Three grades of cancer aggressiveness (G1,

G2, G3) Seek to find patterns of data corresponding

to each grade

Application: data miningApplication: data mining

Page 57: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

57

Selected a sample of 1150 patients from the data set

Data needed to be pre-processed◦ Normalise real-valued attributes to the range [0,1]◦ Balance the three grades of cancer

Application: data miningApplication: data mining

Page 58: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

58

Accuracy based LCS (XCS) used Performance of XCS was compared to C4.5

(decision tree inductive learning technique) Train XCS to match patterns in collections of

attributes to grades of cancer aggressiveness (G1, G2, G3)

Parameters of XCS determined empirically – maximum population size of 10,000 found to be optimal

Application: data miningApplication: data mining

Page 59: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

59

After training, rule set was compacted to make it more manageable using techniques such as removing low accuracy rules and clustering similar rules together

Domain experts asked to comment on the quality and usefulness of rules found and whether they revealed interesting or new information that could aid in diagnosis

Application: data miningApplication: data mining

Page 60: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

60

2,901 rules were randomly selected from XCS and compacted to 300 to be examined by a domain expert

9 considered new or interesting Some of the rules from the compacted set

matched patterns that were already well-known

None contradicted existing knowledge Not all rules were found to be useful

Application: data miningApplication: data mining

Page 61: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

61

Performance of XCS was superior to C4.5 in terms of originality, quality, richness and descriptiveness of rules

More complicated rules Very large rule set (300 when compacted)

makes it more tedious to find interesting new results

Application: data miningApplication: data mining

Page 62: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

62

XCS system used as a means to an end in this case

Alayón et al. 2006 describe a system used to recognise patterns in medical images used for cancer diagnosis

Stone and Bull 2008 describe a system intended for foreign exchange trading

Application: data miningApplication: data mining

Page 63: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

63

Alayón, S, Estévez, JI, Sigut, J, Sánchez, JL & Toledo, P 2006, ‘An evolutionary Michigan recurrent fuzzy system for nuclei classification in cytological images using nuclear chromatin distribution’, Journal of Biomedical Informatics, vol. 39, no. 6, pp. 573-588.

Bull, L & Hurst, J 2002, ‘ZCS redux’, Evolutionary computation, vol. 10, no. 2, pp. 185-205. Butz, MV & Wilson, SW 2002, ‘An algorithmic description of XCS’, Soft Computing, vol. 6, no. 3, pp.

144-153. Gérard, P, Meyer, J & Sigaud, O 2005, ‘Combining latent learning with dynamic programming in the

modular anticipatory classifier system’, European Journal of Operational Research, vol. 160, no. 3, pp. 614-637.

Kharbat, F, Odeh, M & Bull, L 2008, ‘Knowledge Discovery from Medical Data: An Empirical Study with XCS’ in Studies in Computational Intelligence 125: Learning Classifier Systems in Data Mining, eds L Bull, E Bernadó-Mansilla & J Holmes, Springer, Berlin, pp. 93-121.

Sigaud, O & Wilson, SW 2007, ‘Learning classifier systems: a survey’, Soft Computing, vol. 11, no. 11, pp. 1065-1078.

Stolzmann, W 2001, ‘Anticipatory Classifier Systems: An introduction’, AIP Conference Proceedings, vol. 2001, no. 573, pp. 470-476.

Stone, C & Bull, L 2008, ‘Foreign Exchange Trading Using a Learning Classifier System’ in Studies in Computational Intelligence 125: Learning Classifier Systems in Data Mining, eds L Bull, E Bernadó-Mansilla & J Holmes, Springer, Berlin, pp. 169-189.

Urbanowicz, RJ & Moore, JH 2009, ‘Learning Classifier Systems: A Complete Introduction, Review and Roadmap’, Journal of Artificial Evolution and Applications, vol. 2009, 25 pages.

SourcesSources

Page 64: 1 Learning Classifier Systems Andrew Cannon Angeline Honggowarsito 1

64

Questions?Questions?