1 machine learning spring 2013 rong jin. 2 cse847 machine learning instructor: rong jin office...

44
1 Machine Learning Spring 2013 Rong Jin

Post on 19-Dec-2015

252 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

1

Machine Learning

Spring 2013

Rong Jin

Page 2: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

2

CSE847 Machine Learning Instructor: Rong Jin Office Hour:

Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday 4:00pm-5:00pm

Textbook Machine Learning The Elements of Statistical Learning Pattern Recognition and Machine Learning Many subjects are from papers

Web site: http://www.cse.msu.edu/~cse847

Page 3: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

3

Requirements ~10 homework assignments Course project

Topic: visual object recognition Data: over one million images with extracted

visual features Objective: build a classifier that automatically

identifies the class of objects in images Midterm exam & final exam

Page 4: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

4

Goal Familiarize you with the state-of-art in

Machine Learning Breadth: many different techniques Depth: Project Hands-on experience

Develop the way of machine learning thinking Learn how to model real-world problems by

machine learning techniques Learn how to deal with practical issues

Page 5: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

5

Course Outline

Theoretical Aspects• Information Theory

• Optimization Theory

• Probability Theory

• Learning Theory

Practical Aspects• Supervised Learning Algorithms

• Unsupervised Learning Algorithms

• Important Practical Issues

• Applications

Page 6: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

6

Today’s Topics Why is machine learning? Example: learning to play backgammon General issues in machine learning

Page 7: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

7

Why Machine Learning? Past: most computer programs are mainly

made by hand Future: Computers should be able to program

themselves by the interaction with their environment

Page 8: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

8

Recent Trends Recent progress in algorithm and theory Growing flood of online data Computational power is available Growing industry

Page 9: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Big Data Challenge

• 2.7 Zetabytes (1021) of data exists in the digital universe today.

• Huge amount of data generated on the Internet every minute• YouTube users upload 48 hours

of video, • Facebook users share 684,478

pieces of content, • Instagram users share 3,600 new

photos,http://www.visualnews.com/2012/06/19/how-much-data-created-every-minute/

Page 10: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Big Data Challenge High dimensional data appears in many

applications of machine learning

Fine grained visual classification [1]• 250,000 features

Page 11: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Why Data Size Matters ? Matrix completion• Classification, clustering, recommender systems

Page 12: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Why Data Size Matters ?• Matrix can be perfectly recovered provided

the number of observed entries O(rnlog2(n))

Page 13: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Why Data Size Matters ?• The recovery error can be arbitrarily large if

the number of observed entries < O(rnlog(n))

Page 14: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Why Data Size Matters ?

error

# observed entries

O(rnlog (n)) O(rnlog2(n))

Unknow

n

Page 15: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

• Difficult to access finance for small & medium business

• Minimum loan

• Tedious loan approval procedure

• Low approval rate

• Long cycle

• Completely big data driven

• Leverage e-commerce data to financial services

Alibaba Small and Micro Financial Services

Page 16: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

• Insurance contracts has year-on-year growth rate of 100%.• Over 1 billion contracts in 2013• Over 100 million contracts one day on November 11, 2013

201

3-05

201

3-06

201

3-07

201

3-08

201

3-09

201

3-10

201

3-11

201

3-12

201

4-01

201

4-02

201

4-03

40.00%

80.00%

120.00%

Overall rate of compensation

Shipping Insurance for Returned Products

Page 17: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

Uniform 5% fixed rate

Fixed rate Solely based on historical

data and demographics

Actuarial approach

Simple Easy to explain

Pricing model based on a few couple parameters

Data based pricing

Relatively accurate

Millions of features, real time pricing

Machine learned model

Dynamic pricing

Highly accurate

Shipping Insurance for Returned Products

Page 18: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

18

Three Niches for Machine Learning Data mining: using historical data to improve

decisions Medical records medical knowledge

Software applications that are difficult to program by hand Autonomous driving Image Classification

User modeling Automatic recommender systems

Page 19: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

19

Typical Data Mining Task

Given:• 9147 patient records, each describing pregnancy and birth• Each patient contains 215 features

Task:• Classes of future patients at high risk for Emergency Cesarean Section

Page 20: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

20

Data Mining Results

One of 18 learned rules:If no previous vaginal delivery

abnormal 2nd Trimester Ultrasound Malpresentation at admission

Then probability of Emergency C-Section is 0.6

Page 21: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

21

Credit Risk Analysis

Learned Rules:If Other-Delinquent-Account > 2

Number-Delinquent-Billing-Cycles > 1Then Profitable-Costumer ? = no

If Other-Delinquent-Account = 0(Income > $30K or Years-of-Credit > 3)

Then Profitable-Costumer ? = yes

Page 22: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

22

Programs too Difficult to Program By Hand

ALVINN drives 70mph on highways

Page 23: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

23

Programs too Difficult to Program By Hand

ALVINN drives 70mph on highways

Page 24: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

24

Programs too Difficult to Program By Hand

Positive Examples

Negative Examples

Sta

tist

ical

Mod

el

Train Test

Classify Bird Images

Visual object recognition

Page 25: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

25

Image Retrieval using Texts

Page 26: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

26

Software that Models Users

Description:A homicide detective and a fire marshall must stop a pair of murderers who commit videotaped crimes to become media darlings

Rating:

Description: Benjamin Martin is drawn into the American revolutionary war against his will when a brutal British commander kills his son.

Rating:

Description: A biography of sports legend, Muhammad Ali, from his early days to his days in the ring

Rating:

History What to Recommend?Description: A high-school boy is given the chance to write a story about an up-and-coming rock band as he accompanies it on their concert tour.

Recommend: ?

Description: A young adventurer named Milo Thatch joins an intrepid group of explorers to find the mysterious lost continent of Atlantis.

Recommend: ?

No

Yes

Page 27: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

27

Netflix Contest

Page 28: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

28

Relevant Disciplines Artificial Intelligence Statistics (particularly Bayesian Stat.) Computational complexity theory Information theory Optimization theory Philosophy Psychology …

Page 29: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

29

Today’s Topics Why is machine learning? Example: learning to play backgammon General issues in machine learning

Page 30: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

30

What is the Learning Problem Learning = Improving with experience at some task

Improve over task T With respect to performance measure P Based on experience E

Example: Learning to Play Backgammon T: Play backgammon P: % of games won in world tournament E: opportunity to play against itself

Page 31: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

31

Backgammon

More than 1020 states (boards) Best human players see only small fraction of all board

during lifetime Searching is hard because of dice (branching factor > 100)

                                

             

Page 32: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

32

TD-Gammon by Tesauro (1995)

Trained by playing with itself Now approximately equal to the best human

player

Page 33: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

33

Learn to Play Chess Task T: Play chess Performance P: Percent of games won in the

world tournament Experience E:

What experience? How shall it be represented? What exactly should be learned? What specific algorithm to learn it?

Page 34: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

34

Choose a Target Function Goal:

Policy: : b m Choice of value

function V: b, m

B = board

= real values

Page 35: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

35

Choose a Target Function Goal:

Policy: : b m Choice of value

function V: b, m V: b

B = board

= real values

Page 36: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

36

Value Function V(b): Example Definition

If b final board that is won: V(b) = 1 If b final board that is lost: V(b) = -1

If b not final board V(b) = E[V(b*)] where b* is final board after playing optimally

Page 37: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

37

Representation of Target Function V(b)

Same value

for each board

Lookup table

(one entry for each board)

No Learning No Generalization

Summarize experience into• Polynomials• Neural Networks

Page 38: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

38

Example: Linear Feature Representation Features:

pb(b), pw(b) = number of black (white) pieces on board b

ub(b), ub(b) = number of unprotected pieces

tb(b), tb(b) = number of pieces threatened by opponent

Linear function: V(b) = w0pb(b)+ w1pw(b)+ w2ub(b)+ w3uw(b)+ w4tb(b)+

w5tw(b)

Learning: Estimation of parameters w0, …, w5

Page 39: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

39

Given: board b Predicted value V(b) Desired value V*(b)

Calculateerror(b) = (V*(b) – V(b))2

For each board feature fi

wi wi + cerror(b)fi

Stochastically minimizesb (V*(b)-V(b))2

Tuning Weights

Gradient Descent Optimization

Page 40: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

40

Obtain Boards

Random boards Beginner plays Professionals plays

Page 41: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

41

Obtain Target Values Person provides value V(b) Play until termination. If outcome is

Win: V(b) 1 for all boards Loss: V(b) -1 for all boards Draw: V(b) 0 for all boards

Play one move: b b’V(b) V(b’)

Play n moves: b b’… b(n)

V(b) V(b(n))

Page 42: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

42

A General Framework

MathematicalModeling

Finding Optimal Parameters

Statistics Optimization+

Machine Learning

Page 43: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

43

Today’s Topics Why is machine learning? Example: learning to play backgammon General issues in machine learning

Page 44: 1 Machine Learning Spring 2013 Rong Jin. 2 CSE847 Machine Learning  Instructor: Rong Jin  Office Hour: Tuesday 4:00pm-5:00pm TA, Qiaozi Gao, Thursday

44

Importants Issues in Machine Learning Obtaining experience

How to obtain experience? Supervised learning vs. Unsupervised learning

How many examples are enough? PAC learning theory

Learning algorithms What algorithm can approximate function well, when? How does the complexity of learning algorithms impact the learning

accuracy? Whether the target function is learnable?

Representing inputs How to represent the inputs? How to remove the irrelevant information from the input representation? How to reduce the redundancy of the input representation?