24
1 rstuhl für Informatik 2 Gabriella Kókai: Maschine Learning Machine learning Overview PD. Dr. Gabriella Kókai [email protected] Friedrich-Alexander-Universität Lehrstuhl für Informatik 2 Raum 04.131 Tel: 8528996

Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai [email protected] [email protected]

Embed Size (px)

Citation preview

Page 1: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

1Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Machine learning Overview

PD. Dr. Gabriella Kó[email protected]

Friedrich-Alexander-Universität

Lehrstuhl für Informatik 2

Raum 04.131Tel: 8528996

Page 2: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

2Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Machine Learning: Content

Why Machine Learning? How can a learning problem be defined

Designing a learning system: learning to play checker

Perspectives and questions in ML

Summary

Page 3: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

3Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (1/10)

Webster 's definition of 'learn' 'To gain knowledge, or understanding of, or skill in by study

instruction or experience‘ Simons' definition (Machine Learning I, 1993, Chapter 2.)

'Learning denotes changes in the system that are adaptive in the sense that they enable the system to do the same task or tasks drawn from the same population more effectively the next time‘

Donald Michie's Definition (Computer Journal 1991) 'A learning system uses sample data to generate an update basis

for improved (performance) on subsequent data from the same source and express the new basis in intelligible symbolic form'

Page 4: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

4Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (2/10)

Machine learning is typically thought of as a sup-topic of artificial intelligence.

It is inspired by several disciplines

MachineLearning

CognitiveScience

Statistic Pattern Recognition

ComputerScience

Page 5: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

5Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (3/10) Relevant topics:

Artificial Intelligence:Learning: Learning symbolic representation of concepts, ML as search problem , Prior knowledge + training examples guide the learning-process

Bayesian Methods:Calculating probabilities of the hypotheses, Bayesian-classifier Theory of the computational complexity: Theoretical bounds of the complexity for different

learning task measured in the terms of the computational effort, number of different training examples, the number of mistakes required in order to learn

Information theory:Measurement of the entropy, minimal description length, optimal codes and their relationship to optimal training sequences for encoding a hypothesis

Philosophy: Occam's razor suggesting the simpliest hypothesis is the best Psychology and Neurobiology: Motivation of NN the power law of the practice Statistics: Characterisation of the errors (e.g. bias,variance), that occur when estimating the

accuracy of hypothesis based, confidence interval, statistical tests

Goal: Description of the different learning paradigms, the algorithms, the theoretical results and applications

Page 6: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

6Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning?(4/10) Dimension: Constraints

Task/objective Learning task Performance task

Availability of the background knowledge Encoded Interactive

Availability of data Incremental vs. batch Passive vs. active

Characteristics of the data Static vs. drifting Propositional or first-order

Page 7: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

7Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning?(5/10)

Dimension: Approach Search mechanism

Top-Down (model driven) Bottom-up (data driven) Many others

Reasoning methods Induction, abduction, deduction

Page 8: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

8Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (6/10) Deductive Reasoning:

Inductive Reasoning:

Abductive Reasoning:

T B |= E

E B |= T

E T |= B

Page 9: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

9Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (7/10)

Evaluation Methodologies Mathematical

Previously: Learning in the limit Now: PAC (Probably Approximately Correct)

More tolerant Addresses efficiency constraints

Recent: Best cases analysis (Helpful Teacher Model) Average case analysis (constraining assumption)

Empirical:When mathematical analysis isn't obvious Popular Data intensive

Psychological Goal: Model human learning behaviour Method: Comparison with subject data

Page 10: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

10Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (8/10) Knowledge-Poor Supervised Learning

Given: A training set of annotated instances To Induce: A hypothesis (concept description)

Knowledge-Intensive Supervised Learning Given : A set of training instances + a hypothesis of the target concept +

background knowledge To Induce: A modified hypothesis (concept description)

that is consistent with the domain theory & the training instances Unsupervised learning: clustering

Given: A set of unclassified instances I Have not any special target attribute

To Do: Create a set of clusters for I according to their presumed classes Clusters need not to be disjoint Clusters can be hierarchically related

Page 11: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

11Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (9/10) Paradigms knowledge-poor supervised learning:

Concept learning Decision tree (ID3, TIDT) Rule based Lazy learning Genetic algorithms Neural networks Bayesian networks

Paradigms knowledge-intensive supervised learning: Explanation based learning Inductive Logic Programming

Unsupervised learning Bayesian learning Clustering

Page 12: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

12Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Why Machine Learning? (10/10) Importance: How can computers be programmed that they 'learn' Machine learning natural learning Application areas

Data mining: automatic detection of regularity in big amounts of data

Implementation of software, which cannot be easily programmed by hand

Self adaptive programs: programs for playing Theoretical results: Connection among the number of training

examples, the hypothesis and the expected error Biological studies

Page 13: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

13Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

How can the learning problem be defined

Definition: A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P improves with experience E

Example: Learning to play checker Task T: design a program to learn to play checker Performance measure P: The percentage of the games won Experience E: Playing against itself

Page 14: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

14Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Content Why Machine Learning? How can the learning problem be defined

✗ Choosing the training experience✗ Choosing the target function✗ Choosing the representation of the target function✗ Choosing a function approximation algorithm

Designing a learning system: learning to play checker

Perspectives and questions in ML

Summary

Page 15: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

15Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing the Training Experience (1/2) What experience is provided

Direct or indirect feedback regarding the choices executed by the system Direct: Individual checker board states and the correct move for each Indirect: move sequences and final outcomes

Problem: determining the degree to which each move in the sequence deserves credit or blame for the final outcome (credit assignment)

The rate of the controls of the sequence of the training examples by the learning system

The teacher selects informative board states and provides the correct move for each The learner might itself propose board states that it finds particularly confusing and

ask the teacher for the correct move The learner may have complete control over both the board states and the (indirect)

training classification, as it does when it learns playing against itself with no teacher

Page 16: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

16Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing the Training Experience (2/2)

How well does it represent the distribution of examples over which the final system performance P must be measured

Problem: The distribution of the training examples is identical to the distribution of the test examples

A checkers learning problem: Task T: playing checker Performance measure P: percentage of games won in the world

tournament Training experience E: games played against itself

Page 17: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

17Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing the Target Function (1/2) What type of knowledge will be learned and how will this be

used by the performaning program Example: The program needs to learn how to choose the best

move from any board state ChooseMove:

B: the set of legal board state M: the set of legal moves

Problem: difficult to learn if only the kind of indirect training experience is available to our system =>B: the set of legal board states : some real value

B M

V : B

Page 18: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

18Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing the Target Function (2/2)

Question: Definition of the target function V: If b is a final board state that is won, then If b is a final board state that is lost, then If b is a final board state that is drawn, then If b is not a final state in the game, then

where b' is the best final board state that can be achieved starting from b and playing optimally until the end of the game(assuming the opponent plays optimally as well).

Problem: While this definition specifies a value of V(b) for every board state b recursively, this definition is not usable by our checker's player because it is not efficiently computable

Solution: Discovering an operational description of the ideal target function V, Difficult => learning some approximation

V b = 100

V b = 100

V b = V b'

V b = 0

Page 19: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

19Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing a Function Approximation Algorithm (1/2)

How can be represented? For any given board state, the function will be calculated as

a linear combination of weights

bp(p): the number of black pieces on the board rp(b): the number of red pieces on the board bk(b): the number of black kings on the board rk(b): the number of red kings on the board bt(b): the number of black pieces threatened by red

(i.e., which can be captured on red's next turn) rt(b): the number of red pieces threatened by black

iw ,i = 0, ,6

0 1 2 3 4 5 6w + w bp b + w rp b + w bk b + w rk b + w bt b + w rt b

Page 20: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

20Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing a Function Approximation Algorithm (2/2)

Partial design of a checker learning program: Task T: playing checker Performance measure P: percentage of games won in the

world tournament Training experience E: games played against itself Target function Target function representation :

V b w 0 w1 bp b w2 rp b w3 bk b w 4 rk b w5 bt b w6 rt b

V : Board V̂ b

Page 21: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

21Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing a Function Approximation Algorithm:Estimating Training Values

How to assign training values to the more numerous intermediate board states?

Approach: assign the training value of for any intermediate board state b to be , where is the learner's current approximation to V and where Successor(b) denotes the next board state following b for which it is again the program's turn to move.

Rule for estimating the training values:

trainV b V̂ Successor b

trainˆV b V Successor b

Page 22: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

22Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Choosing a Function Approximation Algorithm:Adjusting the Weights

LMS Weight update rule (choosing the weights to best fit the set of training examples)

Best fit:minimise the squared error E between the training values and the values predicted by the hypothesis:

For each training example Use the current weights to calculate:

For each update

c is a small constant that moderates the size weight update.

train(b,V (b))

trainˆerror b = V b V b

V̂ b

i i iw w + c f b error b

wi

2

trainˆE V b V b

(b,V (b)) ttrain

if bp, rp,bk, rk,bt, rt wi

0,1

Page 23: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

23Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Some Issues in Machine Learning

What algorithms can approximate functions well (and when?) How does the number of training examples influence the accuracy? How does the complexity of the hypothesis representation impact it? How does noisy data influence the accuracy? What are the theoretical limits of learnability? How can prior knowledge of the learner help? What clues can we get from a biological learning system? How can systems alter their own representation?

Page 24: Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Machine learning Overview PD. Dr. Gabriella Kókai kokai@informatik.uni-erlangen.de kokai@informatik.uni-erlangen.de

24Lehrstuhl für Informatik 2

Gabriella Kókai: Maschine Learning

Summary Goal: Building computer programs that improve their performance at some

task through experience Application domain:

Data Mining: discover automatically implicit regularities in large data sets Poorly understood domains where humans might not have the knowledge

needed to develop effective algorithms Domains where the program must dynamically adapt to changing conditions

ML draws on ideas from several sets of disciplines, including artificial intelligence, probability and statistics, computational complexity information theory, psychology and neurobiology, control theory and philosophy

Well defined learning problem = well specified task + performance metric + source of training examples