machine learning - wichita state...

44
Machine Learning CS 697AB Fall 2017

Upload: vunguyet

Post on 24-May-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Machine Learning

CS 697AB Fall 2017

Page 2: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Administrative Stuff

Page 3: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Introduction

✤ Instructor: Dr. Kaushik Sinha

✤ 2 lectures per week TR 8:00-9:15 am

✤ Office Hours TR 9:45-10:45 Jabara Hall 243

Page 4: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Study Groups (2-3 people)

✤ This course will cover non-trivial material, learning in a group makes it less hard and more fun!

✤ It is recommended (but not required)

Page 5: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Prerequisites

✤ Three pillars of ML:

✤ Statistics / Probability

✤ Linear Algebra

✤ Multivariate Calculus

✤ Should be confident in at least 1/ 3, ideally 2/ 3.

Page 6: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Grades ...

✤ Your grade is a composite of:

✤ (Homework) (45%)

✤ Exams (Mid-term1, Mid-term 2)(30%)

✤ Final Project (20%)

✤ Class participation (5%)

Page 7: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Homework

• You can discuss homework with your peers but your submitted answer should be your own!

• Make honest attempt on all questions (45% of your total grade)

• Typically include programming assignment on MATLAB

Page 8: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Exams

✤ Exams will be (to some degree) based on homework assignments

✤ Best preparation: Make sure you really really understand the homework assignments

✤ 2 Exams: Midterm 1 & 2

✤ Will be 30% of your grade.

Page 9: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Final Project

✤ 20% of your grade.

✤ Individual projects.

✤ Sufficient details of the project will be provided in class.

✤ You have to “fill in the gaps”

✤ Will require thinking and in-depth study

✤ Details will be posted on course website later

Page 10: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Cheating

✤ Don’t cheat!

✤ Use your common sense.

✤ I won’t be your friend anymore!

Page 11: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

MACHINE LEARNING!!!

Page 12: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

What is Machine Learning?

✤ Formally: (Mitchell 1997): A computer program A 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.

✤ Informally: Algorithms that improve on some task with experience.

Page 13: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

When should we use ML?

✤ Not an ML problem: E.g. traveling salesman, bin packing, 3-sat, etc.

✤ These are well defined problems, that can easily be formalized

✤ What if this is impossible?

✤ E.g. Which picture contains the human, which one contains the dog?

Page 14: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

When should we use ML?

✤ Not ML problems: Traveling Salesman, 3-Sat, etc.

✤ ML Problems: Hard to formalize, but human expert can provide examples / feedback.

✤ Computer needs to learn from feedback.

✤ Is there a sign of cancer in this fMRI scan?

✤ What will the Dow Jones be tomorrow?

✤ Teach a robot to ride a unicycle.

Page 15: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Sometimes easy for humans, hard for computers

✤ Even 1 year old children can identify gender pretty reliably

✤ Easy to come up with examples.

✤ But impossible to formalize as a CS problem.

✤ You need machine learning!

Male or Female?

Page 16: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Example:

Clever

Algorithm

Problem: Given an image of a handwritten d igit, what d igit is it?

2

Input:

Output:

Problem:

You have absolutely no

idea how to do this!

Page 17: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Example: Problem: Given an image of a handwritten d igit, what d igit is it?

Clever

Algorithm

2

Input:

Output:

Problem:

You have absolutely no

idea how to do this!

Good news:

You have examples

0

1

2

3

4

5

6

7

8

9

Page 18: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Machine Learning

Algorithm

The Machine Learning Approach:

Example: Problem: Given an image of a handwritten d igit, what d igit is it?

0

1

2

3

4

5

6

7

8

9

Clever

Algorithm

2

Input:

Output:

Page 19: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Machine Learning

Algorithm

Example: Problem: Given an image of a handwritten d igit, what d igit is it?

0

1

2

3

4

5

6

7

8

9

Learned

Algorithm

2

Training Testing

Page 20: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Handwritten Digits Recognition

✤ (1990-1995) Pretty much solved in the mid nine-tees. (Lecun et al)

✤ Convolutional Neural Networks

✤ Now used by USPS for zip -codes, ATMs for automatic check cashing etc.

Page 21: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

TD-Gammon (1994)

✤ Gerry Tesauro (IBM) teaches a neural network to play Backgammon. The net plays 100K+ games against itself and beats world champion [Neurocomputation 1994]

✤ Algorithm teaches itself how to play so well!!!

Page 22: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Deep Blue (1997)

✤ IBM’s Deep Blue wins against Kasparov in chess. Crucial winning move is made due to Machine Learning (G. Tesauro).

Page 23: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Watson (2011)

✤ IBM’s Watson wins the game show jeopardy against former winners Brad Rutters and Ken Jennings.

✤ Extensive Machine Learning techniques were used .

Page 24: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Face Detection (2001)

✤ Viola Jone’s “solves” face detection

✤ Previously very hard problem in computer vision

✤ Now commodity in off-the-shelf cellphones / cameras

Page 25: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Grand Challenge (2005)

✤ Darpa Grand Challenge: The vehicle must drive autonomously 150 Miles through the dessert along a d ifficult route.

✤ 2004 Darpa Grand Challenge huge d isappointment, best team makes 11.78 / 150 miles

✤ 2005 Darpa Grand Challenge 2 is completed by several ML powered teams.

Page 26: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Speech, Netflix, ...

✤ iPhone ships with built-in speech recognition

✤ Google mobile search speech based (very reliable)

✤ Automatic translation

✤ ....

Page 27: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

ML is the engine for many fields...

Machine

Learning

Computer

Vision

Robotics

Computatio

nal

Biology

Natural

Language

Processing

Page 28: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Internet companies

✤ Collecting massive amounts of data

✤ Hoping that some smart Machine Learning person makes money out of it.

✤ Your future job!

Page 29: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Example: Webmail

Spam

filtering Given Email,

predict if it is

spam or not.

Ad -

matching Given user

info predict

which ad

will be

clicked on.

Page 30: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Example: Websearch Ad Matching

Given query, predict which ad will be

clicked on.

Web-search ranking Given query, predict which

document will be clicked

on.

Page 31: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Example: Google News

Document clustering Given news articles,

automatically identify and

sort them by topic.

Page 32: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

When will it stop?

✤ The human brain is one big learning machine

✤ We know that we can still do a lot better!

✤ However, it is hard . Very few people can design new ML algorithms.

✤ But many people can use them!

Page 33: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

What types of ML are there?

✤ Supervised learning: Given labeled examples, find the right pred iction of an unlabeled example. (e.g. Given annotated images learn to detect faces.)

✤ Unsupervised learning: Given data try to d iscover similar patterns, structure, low d imensional (e.g. automatically cluster news articles by topic)

As far as this course is concerned:

Page 34: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Basic Setup

Pre-processing

Feature Extraction

Learning

(Post-processing)

Clean up the data.

Boring but necessary.

Use expert knowledge to get

representation of data.

Focus of this course.

Whatever you do when you are done.

Page 35: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Feature Extraction

Page 36: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Feature Extraction

Real World

Represent data in terms of vectors.

Features are statistics that describe the data.

Data Vector Space

Each d imension is

one feature.

Page 37: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

✤ Features are statistics that describe the data

✤ Feature: width/height

✤ Pretty good for “1” vs. “2”

✤ Not so good for “2” vs. “3”

16x16

256x1

✤ Feature: raw pixels

✤ Works for d igits (to some degree)

✤ Does not work for trickier stuff

Handwritten digits

Page 38: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Bag of Words for Images

✤ Image: Interest Points 0

1

0

0

0

3

0

0

0

0

✤ Extract interest points and represent the image as a bag of interest points.

Dictionary of possible interest points.

Sparse Vector

Page 39: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Text (Bag of Words)

✤ Text documents: Bag of Words 0

1

0

0

0

2

0

0

0

0

✤ Take d ictionary with n words. Represent a text document as n d imensional vector, where the i-th d imension contains the number of times word i appears in the document.

in

into

...

is

...

...

Page 40: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Audio? Movies?

✤ Use a slid ing window and Fast Fourier Transform

QuickTime™ and aPhoto - JPEG decompressor

are needed to see this picture.

✤ Treat it as a sequence of images

Page 41: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Feature Space

✤ Everything that can be stored on a computer can stored as a vector

✤ Representation is critical for successful learning. [Not in this course, though.]

✤ Throughout this course we will assume data is just points in a Feature Space

✤ Important d istinction: sparse / dense

Every

feature is

present

Most

features

are zero

Page 42: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Mini-Quiz

✤ T/F: Every trad itional CS problem is also an ML problem. FALSE

✤ T/F: Image Features are always dense. FALSE

✤ T/F: The feature space can be very high d imensional. TRUE

✤ T/F: Bag of words features are sparse. TRUE

Page 43: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours

Mini-Quiz

✤ T/F: Every trad itional CS problem is also an ML problem. FALSE

✤ T/F: Image Features are always dense. FALSE

✤ T/F: The feature space can be very high d imensional. TRUE

✤ T/F: Bag of words features are sparse. TRUE

Page 44: Machine Learning - Wichita State Universitysinha/teaching/fall17/cs697AB/slide/intro_17.pdfIntroduction Instructor: Dr. Kaushik Sinha 2 lectures per week TR 8:00-9:15 am Office Hours