Introduction to Machine Learning

Similar documents
Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Lecture 1: Machine Learning Basics

Python Machine Learning

Lecture 1: Basic Concepts of Machine Learning

Laboratorio di Intelligenza Artificiale e Robotica

An Introduction to Simio for Beginners

A Case Study: News Classification Based on Term Frequency

ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY DOWNLOAD EBOOK : ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY PDF

Axiom 2013 Team Description Paper

Laboratorio di Intelligenza Artificiale e Robotica

Exploration. CS : Deep Reinforcement Learning Sergey Levine

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

LEGO MINDSTORMS Education EV3 Coding Activities

Lecture 10: Reinforcement Learning

Word Segmentation of Off-line Handwritten Documents

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

CS Machine Learning

Mathematics process categories

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Rule Learning With Negation: Issues Regarding Effectiveness

CSL465/603 - Machine Learning

Algebra 1, Quarter 3, Unit 3.1. Line of Best Fit. Overview

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

Learning Methods in Multilingual Speech Recognition

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Using focal point learning to improve human machine tacit coordination

Contents. Foreword... 5

Language Acquisition Fall 2010/Winter Lexical Categories. Afra Alishahi, Heiner Drenhaus

Algebra 2- Semester 2 Review

Mathematics subject curriculum

SARDNET: A Self-Organizing Feature Map for Sequences

Chapters 1-5 Cumulative Assessment AP Statistics November 2008 Gillespie, Block 4

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

(Sub)Gradient Descent

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

Five Challenges for the Collaborative Classroom and How to Solve Them

Ohio s Learning Standards-Clear Learning Targets

Intelligent Agents. Chapter 2. Chapter 2 1

Probability and Statistics Curriculum Pacing Guide

MYCIN. The MYCIN Task

Focus of the Unit: Much of this unit focuses on extending previous skills of multiplication and division to multi-digit whole numbers.

Statewide Framework Document for:

Major Milestones, Team Activities, and Individual Deliverables

Artificial Neural Networks written examination

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Speech Recognition at ICSI: Broadcast News and beyond

STT 231 Test 1. Fill in the Letter of Your Choice to Each Question in the Scantron. Each question is worth 2 point.

Assignment 1: Predicting Amazon Review Ratings

Reinforcement Learning by Comparing Immediate Reward

Rover Races Grades: 3-5 Prep Time: ~45 Minutes Lesson Time: ~105 minutes

Diagnostic Test. Middle School Mathematics

UNIT IX. Don t Tell. Are there some things that grown-ups don t let you do? Read about what this child feels.

Section 7, Unit 4: Sample Student Book Activities for Teaching Listening

Switchboard Language Model Improvement with Conversational Data from Gigaword

Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape

Learning Disability Functional Capacity Evaluation. Dear Doctor,

Firms and Markets Saturdays Summer I 2014

Getting Started with Deliberate Practice

We re Listening Results Dashboard How To Guide

Classify: by elimination Road signs

Learning From the Past with Experiment Databases

Computers Change the World

Extending Place Value with Whole Numbers to 1,000,000

Physics 270: Experimental Physics

TCC Jim Bolen Math Competition Rules and Facts. Rules:

Functional Maths Skills Check E3/L x

Spinners at the School Carnival (Unequal Sections)

First Grade Curriculum Highlights: In alignment with the Common Core Standards

Probability estimates in a scenario tree

CS 446: Machine Learning

Learning Optimal Dialogue Strategies: A Case Study of a Spoken Dialogue Agent for

ASTR 102: Introduction to Astronomy: Stars, Galaxies, and Cosmology

Testing A Moving Target: How Do We Test Machine Learning Systems? Peter Varhol Technology Strategy Research, USA

Modeling user preferences and norms in context-aware systems

An OO Framework for building Intelligence and Learning properties in Software Agents

Rule Learning with Negation: Issues Regarding Effectiveness

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Name of Course: French 1 Middle School. Grade Level(s): 7 and 8 (half each) Unit 1

AQUA: An Ontology-Driven Question Answering System

A Case-Based Approach To Imitation Learning in Robotic Agents

Outreach Connect User Manual

Sleeping Coconuts Cluster Projects

Grades. From Your Friends at The MAILBOX

Introduction to Causal Inference. Problem Set 1. Required Problems

Mining Student Evolution Using Associative Classification and Clustering

Generative models and adversarial training

MGF 1106 Final Exam Review / (sections )

Cooking Matters at the Store Evaluation: Executive Summary

The Strong Minimalist Thesis and Bounded Optimality

The Political Engagement Activity Student Guide

Author: Justyna Kowalczys Stowarzyszenie Angielski w Medycynie (PL) Feb 2015

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Characteristics of Functions

Cal s Dinner Card Deals

Kindergarten Lessons for Unit 7: On The Move Me on the Map By Joan Sweeney

Lesson Plan. Preparation

2 months: Social and Emotional Begins to smile at people Can briefly calm self (may bring hands to mouth and suck on hand) Tries to look at parent

PART C: ENERGIZERS & TEAM-BUILDING ACTIVITIES TO SUPPORT YOUTH-ADULT PARTNERSHIPS

Science Fair Project Handbook

Transcription:

Introduction to Machine Learning CS 586 Machine Learning Prepared by Jugal Kalita With help from many sources, including Alpaydin s Introduction to Machine Learning and Mitchell s Machine Learning

Algorithms Algorithm: To solve a problem on a computer, we need an algorithm. An algorithm is a sequence of instructions that when carried out transforms input to output. Example: An algorithm for sorting; Input: a set of numbers; Output: An ordered list of the same numbers. What if we gave a program a number of examples of unsorted lists and corresponding sorted lists, and wanted the program to learn (or, come up with an algorithm) to sort? We may have a meta-algorithm to guide the process, but the machine will learn how to sort without an explicit algorithm. 1

Tasks with No Algorithms There are tasks for which we don t have algorithms. Example: To distinguish between spam and legitimate emails. Issues: In such a case, we usually have examples of spam emails and legitimate emails. We must map an incoming email to yes or no, but there seems to no algorithm that can do so. We want a yes/no answer, or a yes/no answer with a probability or some kind of score. The nature of spam changes from time to time and from person to person. 2

Characteristics of Tasks with No Algorithms What we lack in algorithm or knowledge, we make up in data. We can collect thousands of example messages some of which we know to be spam and others that we know to be legitimate. Task: Our new task is to learn what di erentiates spam from non-spam. In other words, we would like the computer to automatically extract the algorithm or rules for this task, and it s possible that the algorithm or rules remain implicit. 3

Sources of Data and Their Analysis Supermarkets or chain stores generate gigabytes of data every day on customers, goods bought, total money spent, etc. They analyze data for advertising, marketing, ordering, shelving. Banks generate huge amounts of data on their customers. Banks analyze data to o er credit cards, analyze mortgage applicants, detect fraud. Telephone companies analyze call data for optimizing paths for calls, to maximize quality of service, selling new services, pricing. Researchers or practitioners in healthcare informatics analyze large amounts of genomic data, proteomic data, microarray data, patient health records data. 4

A company like Google analyzes content of emails and other documents one may have under various Google services, or the search phrases one uses (possibly, over a period of time), to determine what advertisement to serve. Do you have any datasets that you have worked with or see or read about or you can think of, from which you would like to learn something?

Machine Learning: An Example Consider consumer shopping behavior: We do not know what people buy when exactly, but we know it s not random. E.g., they usually buy chips and soda together; they buy turkey before Thanksgiving. If there are 4 kids in the house, the mother buys 4+ gallons of milk every week, maybe on Wednesday, right after work, assuming she has a job. Certainly, there are patterns in the data. There is a process to how people decide what to buy when in what quantity. Our goal is to discover the process and/or predict what the person will buy when in what quantify. 5

We may not be able to do learn the process or do the prediction exactly and completely, but high accuracy in a timely manner is always the goal. Thus, the goal is to construct a good and useful approximation of the process or the corresponding function, and use this function to (possibly) predict something useful.

Another Example of Machine Learning: Face Recognition This is a task we do usually e ortlessly. We recognize family members, friends and others by looking at their faces or photographs, despite di erences in clothing, pose, lighting, hair style, presence of beard and makeup, new age lines on faces, after loss or greying of hair. We do it subconsciously and cannot explain how we do it. Because we can t explain how we do it, we can t write a straightforward algorithm. We also know that a face is not a random collection of pixels; a face has a structure; it is symmetric; it has pre-defined components: eyes, nose, mouth, located appropriately. 6

Another Example of Machine Learning: Face Recognition (continued...) Each person s face is a pattern composed of a particular combination of these features: nose, eyes, mouth, eyelashes, hair, colors, etc. By analyzing sample face images of a person or a number of persons, a learning program captures the pattern specific to each specific person and uses it to recognize if a new real face or new image belongs to a specific person or not. 7

Uses of Machine Learning Machine Learning creates an optimized model of the concept being learned based on data or past experience (which can be considered as data as well). The model is almost always parameterized. Learning is the execution of a computer program to optimize the parameter values so that the model fits data or past experience well. Uses of learning: Predictive and/or Descriptive. Predictive: Use the model to predict things about an unseen example. Descriptive: Use the model to describe the examples seen or experiences had. This model can be used in some problem-solving situation. 8

AI Perspective: Impact of Machine Learning on System Design Machine learning works with data stored in databases, but it is not just a database problem. It is also a part of artificial intelligence since most people believe that a system cannot be intelligent unless it can learn autonomously in the environment it exists so that its performance doesn t degrade over time and actually improves. To be intelligent, a system that is in a changing environment should have the ability to learn. If a system can learn and adapt to such changes, the system designer need not foresee and provide solutions for all possible situations. 9

An example: Since the nature of spam keeps on changing, a spam detector should be able to adapt.

Machine Learning: Definition Mitchell 1997: A computer program R is said to learn from experience E with respect to some class of tasks T and performance measure P,ifitsperformance at tasks in T as measured by P, improves with experience. Alpaydin 2010: Machine learning is programming computers to optimize a performance criterion using example data or past experience. Marsland 2015: Machine learning is about making computers modify or adapt their actions so that these actions get more accurate. 10

E.g., a program that learns to play poker. It plays random games against another version of itself, and when it loses, it analyzes the game and tries not to make the same mistakes. When it wins, it tries to find what led to the win and reuse such moves.

Examples of Machine Learning Techniques and Applications Supervised Learning: Regression Analysis, Classification Unsupervised Learning: Association Learning, Clustering, Outlier finding Semi-supervised Learning: The amount of labeled data needed (i.e., teacher involvement) for supervised learning is small; it then uses unlabeled data (i.e., no teacher) to learn on its own. Reinforcement Learning: Learning Actions, somewhere in between supervised and unsupervised. Some people may call it a variation of supervised learning with scant supervision. 11

CLASSIFICATION (Supervised Learning) In a classification problem, we have to learn how to classify an unseen example into two or more classes based on examples we have seen earlier. Binary Classification: For example, we can learn how to classify an example into automobile or not automobile by observing a lot of examples. Babies learn how to classify a face as mom or non-mom. Multi-class Classification: We can learn how to classify an example into a sports car, a sedan, an SUV, a truck, a bus, etc. Babies learn how classify a face as mom, dad, brother, sister, grandpa, grandma, family, friend, unknown. 12

Algorithms for Classification Given a set of labeled data, learn how to classify unseen data into two or more classes. Many di erent algorithms have been used for classification. Here are some examples: Decision Trees Artificial Neural Networks Support Vector Machines Bayesian classifiers 13

Example Training Dataset of Classification From Alpaydin 2010, Introduction to Machine Learning page 6. We need to find the boundary between the data representing classes: low-risk and high-risk for lending. 14

Essentially, we need to find a point P ( 1, 2 ) in 2-D to separate the two classes. We can consider 1, 2 to be two parameters we need to learn. Our assumption or inductive bias is that the boundary lines are parallel to the two axes.

Other Inductive Biases There can be a variety of inductive biases: straight line/hyperplane, curved lines, circles/ellipses, spirals, rings, regions bounded by lines parallel to the axes (decision trees), etc. 15

From various sources on the Web.

Applications of Classification Credit Scoring: Classify customers into high-risk and low-risk classes given amount of credit and customer information. Handwriting Recognition: Di erent handwriting styles, di erent writing instruments. 26 *2 = 52 classes for simple Roman alphabet. Determining car license plates for violation or for billing. Printed Character Recognition: OCR. Issues are fonts, spots or smudges, figures for OCR, weather conditions, occlusions, etc. Language models may be necessary. 16

Handwriting Recognition on a Smartphone or Tablet Taken from http://www.gottabemobile.com/forum/uploads/322/recognition.png. 17

License plate Recognition Taken from http://www.platerecognition.info/. This may be an image when a car enters a parking garage or an automatic toll booth on a highway. 18

Applications of Classification (Continued) Face Recognition: Given an image of an individual, classify it into one of the people known. Each person is a class. Issues include poses, lighting conditions, occlusions, occlusion with glasses, makeup, beards, etc. Medical Diagnosis: The inputs are relevant information about the patient and the classes are the illnesses. Features include patient s personal information, medical history, results of tests, etc. Speech Recognition: The input consists of sound waves and the classes are the individual phonemes/sounds that can be spoken. Issues include accents, age, 19

gender, etc. Language models may be necessary in addition to the acoustic input. The International Phonetic Alphabet (IPA) says a total of 107 distinct sounds, corresponding to consonants and vowels, are produced naturally by humans around the world. 31 diacritics are used to modify these, and 19 additional signs indicate qualities such as length, tone, stress, and intonation

Face Recognition Taken from http://www.uk.research.att.com. 20

Applications of Classification (Continued) Natural Language Processing: Parts-of-speech tagging, spam filtering, named entity recognition. Biometrics: Recognition or authentication of people using their physical and/or behavioral characteristics. Examples of characteristics: Images of face, iris and palm; signature, voice, gait, etc. Machine learning has been used for each of the modalities as well as to integrate information from di erent modalities. 21

POS tagging Taken from http://blog.platinumsolutions.com/files/pos-tagger-screenshot.jpg. 22

Named Entity Recognition Taken from http://www.dcs.shef.ac.uk/ hamish/ie/userguide/ne.jpg. 23

REGRESSION Regression analysis includes any techniques for modeling and analyzing several variables, when the focus is on the relationship between a dependent variable and one or more independent variables. Regression analysis helps us understand how the typical value of the dependent variable changes when any one of the independent variables is varied, while the other independent variables are held fixed. The dependent variable is numeric. Regression can be linear, quadratic, higher polynomial, log-based and exponential functions, etc. 24

Regression Taken from http://plot.micw.eu/uploads/main/regression.png. 25

Applications of Regression Navigation of a mobile robot, an autonomous car: The output is the angle by which the steering wheel should be turned each time to advance without hitting obstacles and deviating from the route. The inputs are obtained from sensors on the car: video camera, GPS, etc. Training data is collected by monitoring the actions of a human driver. 26

UNSUPERVISED LEARNING In supervised learning, we learn a mapping from input to output by analyzing examples for which correct values are given by a supervisor or a teacher or a human being. Examples of supervised learning: Classification, regression that we have already seen. In unsupervised learning, there is no supervisor. We have the input data only. The aim is to find regularities in the input. Examples: Association Rule Learning, Clustering, Outlier mining 27

Learning Association (Unsupervised) This is also called (Market) Basket Analysis. If people who buy X typically also buy Y, and if there is a customer who buys X and does not buy Y, he or she is a potential customer for Y. Learn Association Rules: Learn a conditional probability of the form P (Y X) where Y is the product we would like to condition on X, which is a product or a set of products the customer has already purchased. 28

Learning Association (Unsupervised) Given a dataset, extract itemsets of various sizes, find confidence levels, pick highest confidence rules 29

Algorithms for Learning Association The challenge is how to find good associations fast when we have millions or even billions of records. Researchers have come up with many algorithms such as Apriori: The best-known algorithm using breadthfirst search strategy along with a strategy to generate candidates. Eclat: Uses depth-first search and set intersection. FP-growth: uses an extended prefix-tree to store the database in a compressed form. Uses a divideand-conquer approach to decompose both the mining tasks and the databases. 30

Applications of Association Rule Mining Market-basket analysis helps in cross-selling products in a sales environment. Web usage mining: Items can be links on Web pages; Is a person more likely to click on a link having clicked on another link? We may download page corresponding to the next likely link to be clicked. If a customer has bought certain products on Amazon.com, what else could he/she be coaxed to buy? Intrusion detection: Each (or chosen) action is an item. If one action or a sequence of actions has been performed, is the person more likely to perform a few other instructions that may lead to intrusion? 31

Unsupervised Learning: Clustering Clustering: Given a set of data instances, organize them into a certain number of groups such that instances within a group are similar and instances in di erent groups are dissimilar. Bioinformatics: Clustering genes according to gene array expression data. Finance: Clustering stocks or mutual based on characteristics of company or companies involved, or according to performance, or a combination of criteria. Document clustering: Cluster documents based on the words that are contained in them. 32

Customer segmentation: Cluster customers based on demographic information, buying habits, credit information, etc. Companies advertise di erently to di erent customer segments. Outliers may form niche markets.

Clustering Taken from a paper by Das, Bhattacharyya and Kalita, 2009. Clustering time series data. 33

Applications of Clustering (continued) Image Compression using color clustering: Pixels in the image are represented as RGB values. A clustering program groups pixels with similar colors in the same group; such groups correspond to colors occurring frequently. Colors in a cluster are represented by a single average color. We can decide how many clusters we want to obtain the level of compression we want. High level image compression: Find clusters in higher level objects such as textures, object shapes,whole object colors, etc. 34

OUTLIER MINING Finding outliers usually go with clustering, although the mathematical computations may be di erent. C 1, C 2 and C 3 are clusters. O 1 and O 2 belong to singleton or very small clusters. 35

REINFORCEMENT LEARNING (A kind of supervised learning) In some applications, the output of the system is a sequence of actions. A single action is not important alone. What is important is the policy or the sequence of correct actions to reach the goal. In reinforcement learning, reward or punishment comes usually at the very end or infrequent intervals. The machine learning program should be able to assess the goodness of policies ; learn from past good action sequences to generate a policy. 36

Reinforcement Learning... Taken from Artificial Intelligence by Russell and Norvig. The workspace over which agent is trying to learn what to do is a 3x4 grid. In any cell, the agent can perform at most 4 actions (up, down, left, right). The agent gets a reward of +1 in cell (4,3) and -1 in cell (4,2). We need to find the best course of action for the agent in any cell. 37

Reinforcement Learning... The agent has learned a policy, which tells the agent what action to perform in what state. 38

Reinforcement Learning... The problem can be reduced to learning a value for each of the states. In a particular cell, go to the neighboring cell with the highest value. 39

Applications of Reinforcement Learning Game Playing: Games usually have simple rules and environments although the game space is usually very large. A single move is not of paramount importance; a sequence of good moves is needed. We need to learn good game playing policy. Example: Playing world class backgammon or checkers, Playing soccer. 40

Applications of Reinforcement Learning (continued) Imagine we have a robot that cleans the engineering building at night. It knows how to perform actions such as charge itself open a room s door look for the trash can in a room pick up trash can empty trash can lock a door, go up on the elevator, etc. 41

Imagine also that each floor has several charging stations in various locations. At any time, the robot can move in one of a number of directions, or perform one of several actions. After a number of trial runs (not by solving a bunch of complex equations it sets up in the beginning, with complete knowledge of the environment), it should learn the correct sequence of actions to pick up most amount of trash, making sure it is charged all the time. If it is taken to another building, it should be able to learn an optimized sequence of actions for that building.

If one of the charging stations is not working, it should be able to adapt and find a new sequence of actions quickly.

Relevant Disciplines Artificial intelligence Computational complexity theory Control theory Information theory Philosophy Psychology and neurobiology Statistics Bayesian methods 42

What is the Learning Problem?: A Specific Example in Details Reiterating our definition: Learning = Improving with experience at some task Improve at task T with respect to performance measure P based on experience E. Example: Learn to play checkers T : Play checkers P : % of games won in world tournament E: opportunity to play against self 43

Checkers Taken from http://www.learnplaywin.net/checkers/checkers-rules.htm. 64 squares on board. 12 checkers for each player. Flip a coin to determine black or white. Use only black squares. Move forward one space diagonally and forward. No landing on an occupied square. 44

Checkers: Standard rules https://www.youtube.com/watch?v=m0drb0cx8pq Players alternate turns, making one move per turn. A checker reaching last row of board is crowned. A king moves the same way as a regular checker, except he can move forward or backward. One must jump if its possible. Jumping over opponent s checker removes it from board. Continue jumping if possible as part of the same turn. You can jump and capture a king the same way as you jump and capture a regular checker. 45

A player wins the game when all of opponent s checkers are captured, or when opponent is completely blocked.

Steps in Designing a Learning System Choosing the Training Experience Choosing the Target Function: learned? What should be Choosing a Representation for the Target Function Choosing a Learning Algorithm 46

Type of Training Experience Direct or Indirect? Direct: Individual board states and correct move for each board state are given. Indirect: Move sequences for a game and the final result (win, loss or draw) are given for a number of games. How to assign credit or blame to individual moves is the credit assignment problem. 47

Type of Training Experience (continued) Teacher or Not? Supervised: Teacher provides examples of board states and correct move for each. Unsupervised: Learner generates random games and plays against itself with no teacher involvement. Semi-supervised: Learner generates game states and asks the teacher for help in finding the correct move if the board state is di cult or confusing. 48

Reinforcement: Learner generates random games and plays against itself with a teacher/the environment giving rewards/punishments once in a while.

Type of Training Experience (continued) Is the training experience good? Do the training examples represent the distribution of examples over which the final system performance will be measured? Performance is best when training examples and test examples are from the same/a similar distribution. Our checker player learns by playing against oneself. Its experience is indirect. It may not encounter moves that are common in human expert play. 49

Choose the Target Function Assume that we have written a program that can generate all legal moves from a board position. We need to find a target function ChooseMove that will help us choose the best move among alternatives. This is the learning task. ChooseMove : Board! Move. Given a board position, find the best move. Such a function is di cult to learn from indirect experience. Alternatively, we want to learn V : Board! <. Given a board position, learn a numeric score for it such that higher score means a better board position. Our goal is to learn V. 50

A Possible (Ideal) Definition for Target Function if b is a final board state that is won, then V (b) = 100 if b is a final board state that is lost, then V (b) = 100 if b is a final board state that is drawn, then V (b) = 0 if b is a not a final state in the game, then V (b) = V (b 0 ), where b 0 is the best final board state that can be achieved starting from b and playing optimally until the end of the game. This gives correct values, but is not operational because it is not e ciently computable since it requires searching till the end of the game. We need an operational definition of V. 51

Choose Representation for Target Function We need to choose a way to represent the ideal target function in a program. A table specifying values for each possible board state? collection of rules? neural network? polynomial function of board features?... We use ˆV to represent the actual function our program will learn. We distinguish ˆV from the ideal target function V. ˆV is a function approximation for V. 52

A Representation for Learned Function ˆV = w 0 + w 1 x 1 (b)+w 2 x 2 (b)+w 3 x 3 (b)+w 4 x 4 (b) +w 5 x 5 (b)+w 6 x 6 (b) x 1 (b): number of black pieces on board b x 2 (b): number of red pieces on b x 3 (b): number of black kings on b x 4 (b): number of red kings on b x 5 (b): number of red pieces threatened by black (i.e., which can be taken on black s next turn) x 6 (b): number of black pieces threatened by red It is a simple equation. Note a more complex representation requires more training experience to learn. 53

Specification of the Machine Learning Problem at this time Task T : Play checkers Performance Measure P : % of games won in world tournament Training Experience E: opportunity to play against self Target Function: V : Board!< Target Function Representation: ˆV = w 0 + w 1 x 1 (b)+w 2 x 2 (b)+w 3 x 3 (b)+w 4 x 4 (b) +w 5 x 5 (b)+w 6 x 6 (b) The last two items are design choices regarding how to implement the learning program. The first three specify the learning problem. 54

Generating Training Data To train our learning program, we need a set of training data, each describing a specific board state b and the training value V train (b) forb. Each training example is an ordered pair hb, V train (b)i. For example, a training example may be hhx 1 =3,x 2 =0,x 3 =1,x 4 =0,x 5 =0,x 6 =0i, +100i This is an example where black has won the game since x 2 = 0 or red has no remaining pieces. However, such clean values of V train (b) can be obtained only for board value b that are clear win, loss or draw. For other board values, we have to estimate the value of V train (b). 55

Generating Training Data (continued) According to our set-up, the player learns indirectly by playing against itself and getting a result at the very end of a game: win, loss or draw. Board values at the end of the game can be assigned values. How do we assign values to the numerous intermediate board states before the game ends? A win or loss at the end does not mean that every board state along the path of the game is necessarily good or bad. However, a very simple formulation for assigning values to board states works under certain situations. 56

Generating Training Data (continued) The approach is to assign the training value V train (b) for any intermediate board state b to be ˆV (Successor(b)) where ˆV is the learner s current approximation to V (i.e., it uses the current weights w i ) and Successor(b) is the next board state for which it s again the program s turn to move. V train (b) ˆV (Successor(b)) It may look a bit strange that we use the current version of ˆV to estimate training values to refine the very same function, but note that we use the value of Successor(b) to estimate the value of b. 57

Training the Learner: Choose Weight Training Rule LMS Weight update rule: For each training example b do Compute error(b): error(b) =V train (b) ˆV (b) For each board feature x i, update weight w i : w i w i + x i error(b) Endfor Endfor Here is a small constant, say 0.1, to moderate the rate of learning. 58

Checkers Design Choices Determine Type of Training Experience Games against experts Games against self Table of correct moves... Determine Target Function Board!"move Board!"value... Determine Representation of Learned Function Polynomial Linear function of six features Artificial neural network... Determine Learning Algorithm Gradient descent Linear programming... Completed Design Taken from Page 13, Machine Learning by Tom Mitchell, 1997. 59

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