machine learning cse 681 ch1 - introduction. introduction to machine learning 2nd edition ethem...

38
Machine Learning CSE 681 CH1 - INTRODUCTION

Upload: margaret-rainbow

Post on 29-Mar-2015

239 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Machine LearningCSE 681

CH1 - INTRODUCTION

Page 2: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

INTRODUCTION TO

Machine Learning2nd Edition

ETHEM ALPAYDIN

© The MIT Press, 2010

[email protected]://www.cmpe.boun.edu.tr/~ethem/i2ml2e

Textbook:

Page 3: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

3

Algorithms Algorithm: To solve a problem on a computer,

we need an algorithm. An algorithm is a sequence of instructions that transforms a given input to output.

For example, one can devise an algorithm for sorting.

For sorting, there may be various algorithms and we may be interested in finding the most efficient one, requiring the least number of instructions (time) or memory or both.

Page 4: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

4

Tasks without algorithms For some tasks, however, we do not have an

algorithm for example, to tell spam emails from legitimate emails.

We know what the input is: an email document that in the simplest case is a file of characters.

We know what the output should be: a yes/no output indicating whether the message is spam or not.

We do not know how to transform the input to the output. What can be considered spam changes in time and from individual to individual.

Page 5: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

5

Example Data We can easily compile thousands of example

messages some of which we know to be spam and what we want is to “learn” what consititutes spam from them.

In other words, we would like the computer (machine) to extract automatically (learn) an algorithm (model) for this task.

There are many applications for which we do not have an algorithm but do have example data.

Page 6: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

6

Machine Learning Textbook definition: Machine learning is

programming computers to optimize a performance criterion using example data or past experience.

Tom Mitchell’s definition:

Page 7: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

What is learning

7

H. Simon: Any process by which a system improves its performance

M. Minsky: Learning is making useful changes in our minds

R. Michalsky: Learning is constructing or modifying representations of what is being experienced

L. Valiant: Learning is the process of knowledge acquisition in the absence of explicit programming

Page 8: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

8

Why “Learn” ? There is no need to “learn” to calculate payroll Learning is used when:

Human expertise does not exist (navigating on Mars),

Humans are unable to explain their expertise (speech recognition)

Solution changes in time (routing on a computer network)

Solution needs to be adapted to particular cases (user biometrics)

Page 9: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

9

What We Talk About When We Talk About“Learning” Learning general models from a data of

particular examples Data is cheap and abundant (data

warehouses, data marts); knowledge is expensive and scarce.

Example in retail: Customer transactions to consumer behavior:

People who bought “Blink” also bought “Outliers” (www.amazon.com)

Build a model that is a good and useful approximation to the data.

Page 10: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

10

Data Mining Application of machine learning methods to

large databases is called data mining. Retail: Market basket analysis, Customer

relationship management (CRM) Finance: Credit scoring, fraud detection Manufacturing: Control, robotics,

troubleshooting Medicine: Medical diagnosis Telecommunications: Spam filters, intrusion

detection Bioinformatics: Motifs, alignment Web mining: Search engines ...

Page 11: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

11

What is Machine Learning? Optimize a performance criterion using

example data or past experience. Role of Statistics: Inference from a sample Role of Computer science: Efficient algorithms

to Solve the optimization problem Representing and evaluating the model for

inference

Page 12: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

12

What is Machine Learning?

Source: Tom Mithcell

Page 13: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

13

Brief History Studied ever since computers were invented (e.g.

Samuel's checkers player) Very active in 1960s (neural networks) Died down in the 1970s Revival in early 1980s (decision trees,

backpropagation, temporal difference learning) - coined as “machine learning“

Exploded starting in the 1990s Now: very active research field, several yearly

conferences (e.g., ICML, NIPS), major journals (e.g., Machine Learning, Journal of Machine Learning Research)

Page 14: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

14

ML niche is growing Machine learning already the preferred approach

to Speech recognition, Natural language processing Computer vision Medical outcomes analysis Robot control

The time is right to study in the field! Lots of recent progress in algorithms and theory Flood of data to be analyzed (Increased data capture,

networking, new sensors) Software too complex to write by hand Computational power is available Growing demand for industrial applications

Page 15: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

15

ML Methods and Applications Association Supervised Learning

Classification Regression

Unsupervised Learning Reinforcement Learning

Page 16: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

16

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.

Page 17: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

17

Learning Associations Basket analysis:

P (Y | X ) probability that somebody who buys X also buys Y where X and Y are products/services.

Example: P ( chips | beer ) = 0.7

Page 18: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

18

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 temped 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?

Page 19: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

19

Classification

Example: Credit scoring

We need a boundry (discriminant) differentiating between low-risk and high-risk customers from their income and savings

Discriminant: IF income > θ1 AND savings > θ2 THEN low-risk ELSE high-risk

Page 20: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

20

Classification: Applications Aka Pattern recognition Face recognition: Pose, lighting, occlusion

(glasses, beard), make-up, hair style Character recognition: Different handwriting

styles. Speech recognition: Temporal dependency. Medical diagnosis: From symptoms to illnesses Biometrics: Recognition/authentication using

physical and/or behavioral characteristics: Face, iris, signature, etc

...

Page 21: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

21

Handwriting Recognition

Page 22: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

22

Plate Recognition

Page 23: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

23

Face Recognition

Training examples of a person

Test images

ORL dataset,AT&T Laboratories, Cambridge UK

Page 24: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

24

Natural Language Processing Applications Parts-of-speech tagging, spam filtering,

named entity recognition.

Page 25: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

25

Named Entity Recognition

Page 26: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

26

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.

Regression can be linear, quadratic, higher polynomial, log-based and exponential functions, etc.

Page 27: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Regression

Example: Price of a used car

x : car attributesy : price

y = g (x | q )g ( ) model, q parameters

27

y = wx+w0

Page 28: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

28

Example: Navigation of a mobile robot or 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.

Page 29: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

29

Regression Applications

Navigating a car: Angle of the steering Kinematics of a robot arm

α1= g1(x,y)

α2= g2(x,y)

α1

α2

(x,y)

Response surface design

Page 30: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

30

Supervised Learning: Uses

Prediction of future cases: Use the rule to predict the output for future inputs

Knowledge extraction: The rule is easy to understand

Compression: The rule is simpler than the data it explains

Outlier detection: Exceptions that are not covered by the rule, e.g., fraud

Page 31: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

31

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

Page 32: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

32

Unsupervised Learning Learning “what normally happens” No output Clustering: Grouping similar instances Example applications

Customer segmentation in CRM Image compression: Color quantization Bioinformatics: Learning motifs

Page 33: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

33

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 different 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.

Document clustering: Cluster documents based on the words that are contained in them.

Customer segmentation: Cluster customers based on demographic information, buying habits, credit

Page 34: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0)

34

REINFORCEMENT 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”.

Page 35: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

35

Reinforcement Learning Applications Credit assignment problem Game playing Robot in a maze Multiple agents, partial observability, ...

Page 36: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

36

Resources: Datasets UCI Repository:

http://www.ics.uci.edu/~mlearn/MLRepository.html

UCI KDD Archive: http://kdd.ics.uci.edu/summary.data.application.html

Statlib: http://lib.stat.cmu.edu/

Delve: http://www.cs.utoronto.ca/~delve/

Page 37: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

37

Resources: Journals Journal of Machine Learning Research

www.jmlr.org Machine Learning Neural Computation Neural Networks IEEE Transactions on Neural Networks IEEE Transactions on Pattern Analysis and

Machine Intelligence Annals of Statistics Journal of the American Statistical Association ...

Page 38: Machine Learning CSE 681 CH1 - INTRODUCTION. INTRODUCTION TO Machine Learning 2nd Edition ETHEM ALPAYDIN © The MIT Press, 2010 alpaydin@boun.edu.tr ethem/i2ml2e

38

Resources: Conferences International Conference on Machine Learning

(ICML) European Conference on Machine Learning (ECML) Neural Information Processing Systems (NIPS) Uncertainty in Artificial Intelligence (UAI) Computational Learning Theory (COLT) International Conference on Artificial Neural

Networks (ICANN) International Conference on AI & Statistics

(AISTATS) International Conference on Pattern Recognition

(ICPR) ...