machine learning: what’s the challenge? · introduction to machine learning example task for...

28
INTRODUCTION TO MACHINE LEARNING Machine Learning: What’s The Challenge?

Upload: others

Post on 26-Jun-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Machine Learning: What’s The Challenge?

Page 2: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Goals of the course

● Identify a machine learning problem

● Use basic machine learning techniques

● Think about your data/results

Page 3: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

What is Machine Learning?

● Construct/use algorithms that learn from data

● More information Higher performance

● Previous solutions Experience

Page 4: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Example

● Task for computer = label unseen square:

?

● Label squares: size and edge color

● Earlier observations (labeled by humans):

● Result: right or wrong!

Page 5: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Input KnowledgeIn example: pre-labeled squares

size edge color

small do!ed green

big striped yellow

medium normal green

Observations

Features Label

> squares <- data.frame( size = c("small", "big", "medium"), edge = c("dotted", "striped", "normal"), color = c("green", "yellow", "green"))

In R - use data.frame()

Page 6: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Data Frame Functions

> str(squares)

> summary(squares)

> dim(squares) #Observations, #Features

Distribution Measures

Structured Overview

Page 7: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Formulation

INPUT FUNCTION OUTPUT

ESTIMATED FUNCTION COLOR

Page 8: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

ML: What It Is Not

NOT Machine Learning}

Goal: Building models for prediction!

● Determining most occurring color

● Calculating average size

Page 9: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Regression

INPUT: WeightOUTPUT: Height

Regression

Height Weight

Estimated function:

Page 10: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

More Applications!● Shopping basket analysis

● Movie recommendation systems

● Decision making for self-driving cars

● and many more!

Page 11: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Let’s practice!

Page 12: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Classification Regression Clustering

Page 13: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Common ML Problems

● Classification

● Regression

● Clustering

Page 14: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Classification Problem

EstimateCLASSIFIER

ClassUnseen DataCLASSIFIER

Goal: predict category of new observation

Earlier Observations

Page 15: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Classification Applications● Medical Diagnosis

● Animal Recognition

● Qualitative Output

● Predefined Classes

Important:

Sick and Not Sick

Dog, Cat and Horse

Page 16: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Regression

PREDICTORSREGRESSION

FUNCTION RESPONSE

● Relationship: Height - Weight?

● Linear?

● Predict: Weight Height

Page 17: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Regression Model

● Coefficients:

Estimate on previous input-output

> lm(response ~ predictor)

Fi"ing a linear function

● Response:

● Predictor:

Page 18: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Regression Applications● Payments Credit Scores

● Time Subscriptions

● Grades Landing a Job

● Quantitative Output

● Previous input-output observations

Page 19: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Clustering

● Similar within cluster

● Dissimilar between clusters

● No labels

● No right or wrong

● Plenty possible clusterings

● Clustering: grouping objects in clusters

● Example: Grouping similar animal photos

Page 20: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

k-Means

0 5 10

−50

5

x

y

Cluster data in k clusters!

0 5 10

−50

5

x

y

Page 21: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Let’s Practice

Page 22: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Supervised vs.

Unsupervised

Page 23: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Machine Learning Tasks● Classification

● Regression

● Clustering

quite similar

Page 24: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Supervised LearningFind: function f ̂which can be used to assign a

class or value to unseen observations.

Given: a set of labeled observations

Supervised Learning

Page 25: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Unsupervised Learning● Labeling can be tedious, o!en done by humans

● Some techniques don’t require labeled data

● Unsupervised Learning

● Clustering: find groups observation that are similar

● Does not require labeled observations

Page 26: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Performance of the model● Supervised Learning

● Compare real labels with predicted labels

● Predictions should be similar to real labels

● Unsupervised Learning

● No real labels to compare

● Techniques will be explained in this course

Page 27: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

Introduction to Machine Learning

Semi-Supervised Learning● A lot of unlabeled observations

● A few labeled

● Group similar observations using clustering

● Use clustering information and classes of labeled observations to assign a class to unlabelled observations

● More labeled observations for supervised learning

Page 28: Machine Learning: What’s The Challenge? · Introduction to Machine Learning Example Task for computer = label unseen square: Label squares: size and edge color Earlier observations

INTRODUCTION TO MACHINE LEARNING

Let’s practice!