Presentation is loading. Please wait.

Presentation is loading. Please wait.

MACHINE LEARNING. What is learning? A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) A computer.

Similar presentations


Presentation on theme: "MACHINE LEARNING. What is learning? A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) A computer."— Presentation transcript:

1 MACHINE LEARNING

2 What is learning? A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) Any change in a system that allows it to perform better (Simon 1983) Any change in a system that allows it to perform better (Simon 1983)

3 What do we learn: Descriptions Rules how to recognize/classify objects, states, events Rules how to transform an initial situation to achieve a goal (final state)

4 How do we learn: Rote learning - storage of computed information. Taking advice from others. (Advice may need to be operationalized.) Learning from problem solving experiences - remembering experiences and generalizing from them. (May add efficiency but not new knowledge.) Learning from examples. (May or may not involve a teacher.) Learning by experimentation and discovery. (Decreasing burden on teacher, increasing burden on learner.)

5 Approaches to Machine Learning Symbol-based Connectionist Learning Evolutionary learning

6 Inductive Symbol-Based Machine Learning Concept Learning Version space search Version space search Decision trees: ID3 algorithm Decision trees: ID3 algorithm Explanation-based learning Explanation-based learning Supervised learning Supervised learning Reinforcement learning Reinforcement learning

7 Version space search for concept learning Concepts – describe classes of objects Concepts – describe classes of objects Concepts consist of feature sets Concepts consist of feature sets Operation on concept descriptions Operation on concept descriptions Generalization: Replace a feature with a variable Generalization: Replace a feature with a variable Specialization: Instantiate a variable with a feature Specialization: Instantiate a variable with a feature

8 Positive and Negative examples of a concept The concept description has to match all positive examples The concept description has to match all positive examples The concept description has to be false for the negative examples The concept description has to be false for the negative examples

9 Plausible descriptions The version space represents all the alternative plausible descriptions of the concept A plausible description is one that is applicable to all known positive examples and no known negative example.

10 Algorithm: Candidate elimination Given: A representation language A set of positive and negative examples expressed in that language Compute: A concept description that is consistent with all the positive examples and none of the negative examples

11 Hypotheses The version space contains two sets of hypotheses: G – the most general hypotheses that match the training data S – the most specific hypotheses that match the training data Each hypothesis is represented as a vector of values of the known attributes

12 Example of Version space Consider the task to obtain a description of the concept: Japanese Economy car. The attributes under consideration are: Origin, Manufacturer, Color, Decade, Type training data: Positive ex: (Japan, Honda, Blue, 1980, Economy) Positive ex: (Japan, Honda, White, 1980, Economy) Negative ex: (Japan, Toyota, Green, 1970, Sports)

13 Example continued The most general hypothesis that match the data is: (?, Honda, ?, ?, Economy) the symbol ‘?’ means that the attribute may take any value The most specific hypothesis that match the examples is: (Japan, Honda, ?,?, Economy)

14 Algorithm: Candidate elimination Initialize G to contain one element: the null description (all features are variables). Initialize S to contain one element: the first positive example. Accept a new training example.

15 Matching positive examples Remove from G any descriptions that do not cover the example. Update the S set to contain the most specific set of descriptions in the version space that cover the example and the current elements of the S set (i.e., generalize the elements of S as little as possible so that they cover the new training example )

16 Matching negative examples Remove from S any descriptions that cover the negative example. Update the G set to contain the most general set of descriptions in the version space that do not cover the example (i.e., specialize the elements of G as little as possible so that the negative example is no longer covered by any of the elements of G).

17 Comparing G and S If S and G are both singleton sets, then: if they are identical, output their value and halt. if they are different, the training cases were inconsistent. Output this result and halt. Else continue accepting new training examples

18 Learning the concept of "Japanese economy car" Features: Origin, Manufacturer, Color, Decade, Type POSITIVE EXAMPLE: (Japan, Honda, Blue, 1980, Economy) Initialize G to singleton set that includes everything Initialize S to singleton set that includes first positive example G = {(?, ?, ?, ?, ?)} S = {(Japan, Honda, Blue, 1980, Economy)}

19 Example continued NEGATIVE EXAMPLE: (Japan, Toyota, Green, 1970, Sports) Specialize G to exclude negative example G = {(?, Honda, ?, ?, ?), (?, ?, Blue, ?, ?) (?, ?, ?, 1980, ?) (?, ?, ?, ?, Economy)} S = {(Japan, Honda, Blue, 1980, Economy)}

20 Example continued POSITIVE EXAMPLE: (Japan, Toyota, Blue, 1990, Economy) Remove from G descriptions inconsistent with positive example Generalize S to include positive example G = { (?, ?, Blue, ?, ?) (?, ?, ?, ?, Economy)} S = {(Japan, ?, Blue, ?, Economy)}

21 Example continued NEGATIVE EXAMPLE: (USA, Chrysler, Red, 1980, Economy) Specialize G to exclude negative example (but staying within version space, i.e., staying consistent with S) G = {(?, ?, Blue, ?, ?) (Japan, ?, ?, ?, Economy)} S = {(Japan, ?, Blue, ?, Economy)}

22 Example continued POSITIVE EXAMPLE: (Japan, Honda, White, 1980, Economy) Remove from G descriptions inconsistent with positive example Generalize S to include the positive example G = {(Japan, ?, ?, ?, Economy)} S = {(Japan, ?, ?, ?, Economy)} S = G, both singleton => done!

23 Decision trees A decision tree is a structure that represents a procedure for classifying objects based on their attributes. Each object is represented as a set of attribute/value pairs and a classification.

24 Example A set of medical symptoms might be represented as follows: Cough Fever Weight Pain Classification Mary no yes normal throat flu Fred no yes normal abdomen appendicitis Julie yes yes skinny none flu Elvis yes no obese chest heart disease The system is given a set of training instances along with their correct classifications and develops a decision tree based on these examples.

25 Choosing Good Attributes If a crucial attribute is not represented, then no decision tree will be able to learn the concept. If two training instances have the same representation but belong to different classes, then the attribute set is said to be inadequate. It is impossible for the decision tree to distinguish the instances.

26 Learning of Decision Trees Algorithm: The ID3 learning algorithm (Quinlan, 1986) If all examples from E belong to the same class Cj then label the leaf with Cj else select the “best” decision attribute A with values v1, v2, …, vn for next node divide the training set S into S1, …, Sn according to values v1,…,vn recursively build subtrees T1, …, Tn for S1, …, Sn generate decision tree T Which attribute is best?

27 Entropy S S - a sample of training examples; p + (p - ) is a proportion of positive (negative) examples in S Entropy(S) = expected number of bits needed to encode the classification of an arbitrary member of S Information theory: optimal length code assigns -log 2 p bits to message having probability p Expected number of bits to encode “+” or “-” of random member of S: Entropy(S)  - p -  log 2 p - - p +  log 2 p + Generally for c different classes Entropy(S)   c - p i  log 2 p i

28 Information Gain Search Heuristic Gain(S,A) - the expected reduction in entropy caused by partitioning the examples of S according to the attribute A. a measure of the effectiveness of an attribute in classifying the training data Values(A) - possible values of the attribute A Sv - subset of S, for which attribute A has value v The best attribute has maximal Gain(S,A) Aim is to minimise the number of tests needed for class.

29 Examples of Training Examples

30 Sources Ashwin Ram, 1990-93 Assistant Professor, College of Computing Georgia Institute of Technology, Atlanta http://www.cc.gatech.edu/classes/cs3361_97_winter/learning.txt J. Kubalik. Machine Learning I – Outline. Gerstner Laboratory for Intelligent Decision Making and Control


Download ppt "MACHINE LEARNING. What is learning? A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) A computer."

Similar presentations


Ads by Google