ECE 5424: Introduction to Machine Learning

Slides:



Advertisements
Similar presentations
Lecture Notes for E Alpaydın 2010 Introduction to Machine Learning 2e © The MIT Press (V1.0) ETHEM ALPAYDIN © The MIT Press, 2010
Advertisements

CHAPTER 2: Supervised Learning. Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2 Learning a Class from Examples.
CPSC 502, Lecture 15Slide 1 Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 15 Nov, 1, 2011 Slide credit: C. Conati, S.
Indian Statistical Institute Kolkata
ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
1 Chapter 10 Introduction to Machine Learning. 2 Chapter 10 Contents (1) l Training l Rote Learning l Concept Learning l Hypotheses l General to Specific.
Machine Learning CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanning.
Pattern Recognition. Introduction. Definitions.. Recognition process. Recognition process relates input signal to the stored concepts about the object.
INTRODUCTION TO Machine Learning ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Part I: Classification and Bayesian Learning
More Machine Learning Linear Regression Squared Error L1 and L2 Regularization Gradient Descent.
Machine Learning1 Machine Learning: Summary Greg Grudic CSCI-4830.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Classification: Naïve Bayes Readings: Barber
Machine Learning Seminar: Support Vector Regression Presented by: Heng Ji 10/08/03.
Introduction to machine learning and data mining 1 iCSC2014, Juan López González, University of Oviedo Introduction to machine learning Juan López González.
ECE 6504: Deep Learning for Perception Dhruv Batra Virginia Tech Topics: –Neural Networks –Backprop –Modular Design.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Statistical Estimation (MLE, MAP, Bayesian) Readings: Barber 8.6, 8.7.
Overview of Supervised Learning Overview of Supervised Learning2 Outline Linear Regression and Nearest Neighbors method Statistical Decision.
1 Pattern Recognition Pattern recognition is: 1. A research area in which patterns in data are found, recognized, discovered, …whatever. 2. A catchall.
Learning from observations
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Unsupervised Learning: Kmeans, GMM, EM Readings: Barber
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –(Finish) Nearest Neighbour Readings: Barber 14 (kNN)
Concept learning, Regression Adapted from slides from Alpaydin’s book and slides by Professor Doina Precup, Mcgill University.
1 Chapter 10 Introduction to Machine Learning. 2 Chapter 10 Contents (1) l Training l Rote Learning l Concept Learning l Hypotheses l General to Specific.
INTRODUCTION TO MACHINE LEARNING 3RD EDITION ETHEM ALPAYDIN © The MIT Press, Lecture.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Supervised Learning –General Setup, learning from data –Nearest Neighbour.
Chapter1: Introduction Chapter2: Overview of Supervised Learning
Bias-Variance in Machine Learning. Bias-Variance: Outline Underfitting/overfitting: –Why are complex hypotheses bad? Simple example of bias/variance Error.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Ensemble Methods: Bagging, Boosting Readings: Murphy 16.4; Hastie 16.
CS 2750: Machine Learning Machine Learning Basics + Matlab Tutorial
Data Mining and Decision Support
Machine Learning ICS 178 Instructor: Max Welling Supervised Learning.
CS 2750: Machine Learning The Bias-Variance Tradeoff Prof. Adriana Kovashka University of Pittsburgh January 13, 2016.
MACHINE LEARNING 3. Supervised Learning. Learning a Class from Examples Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Decision/Classification Trees Readings: Murphy ; Hastie 9.2.
Learning Kernel Classifiers 1. Introduction Summarized by In-Hee Lee.
Machine Learning Lecture 1: Intro + Decision Trees Moshe Koppel Slides adapted from Tom Mitchell and from Dan Roth.
SUPERVISED AND UNSUPERVISED LEARNING Presentation by Ege Saygıner CENG 784.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –(Finish) Model selection –Error decomposition –Bias-Variance Tradeoff –Classification:
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
Dhruv Batra Georgia Tech
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
CS 2750: Machine Learning Introduction
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
ECE 5424: Introduction to Machine Learning
INTRODUCTION TO Machine Learning
Computational Learning Theory
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
10701 / Machine Learning Today: - Cross validation,
2D transformations (a.k.a. warping)
Computational Learning Theory
Why Machine Learning Flood of data
Model generalization Brief summary of methods
Machine learning overview
CS639: Data Management for Data Science
Machine Learning – a Probabilistic Perspective
Jia-Bin Huang Virginia Tech
INTRODUCTION TO Machine Learning
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
INTRODUCTION TO Machine Learning 3rd Edition
Presentation transcript:

ECE 5424: Introduction to Machine Learning Topics: Supervised Learning General Setup, learning from data Nearest Neighbour Readings: Barber 14 (kNN) Stefan Lee Virginia Tech

Tuesday’s Class Students Room (C) Dhruv Batra

Administrative New class room? More space? Nope. It doesn’t look like we will get any more room. More space? Nope. If people drop and you get lucky, you may get a spot. Course picker (C) Dhruv Batra

Administrative Scholar Reading/Material/Pointers/Videos Anybody not have access? Still have problems reading/submitting? Resolve ASAP. Please post questions on Scholar Forum. Please check scholar forums. You might not know you have a doubt. Reading/Material/Pointers/Videos Slides/notes on Scholar & Public Website Readings/Video pointers on Public Website Scholar: https://scholar.vt.edu/portal/site/f16ece5424 Website: https://filebox.ece.vt.edu/~s15ece5984/ (C) Dhruv Batra

Administrative Computer Vision & Machine Learning Reading Group Meet: Monday 2-4pm Reading CV/ML Conference Papers Whittemore 654 (C) Dhruv Batra

Plan for today Supervised/Inductive Learning Setup Goal: Classification, Regression Procedural View Statistical Estimation View Loss functions Your first classifier: k-Nearest Neighbour (C) Dhruv Batra

Types of Learning Supervised learning Unsupervised learning Training data includes desired outputs Unsupervised learning Training data does not include desired outputs Weakly or Semi-supervised learning Training data includes a few desired outputs Reinforcement learning Rewards from sequence of actions (C) Dhruv Batra

Supervised / Inductive Learning Given examples of a function (x, f(x)) Predict function f(x) for new examples x Discrete f(x): Classification Continuous f(x): Regression f(x) = Probability(x): Probability estimation Compare to deductive (C) Dhruv Batra

Slide Credit: Pedro Domingos, Tom Mitchel, Tom Dietterich

Supervised Learning Input: x (images, text, emails…) Output: y (spam or non-spam…) (Unknown) Target Function f: X  Y (the “true” mapping / reality) Data (x1,y1), (x2,y2), …, (xN,yN) Model / Hypothesis Class g: X  Y y = g(x) = sign(wTx) Learning = Search in hypothesis space Find best g in model class. (C) Dhruv Batra

Slide Credit: Yaser Abu-Mostapha (C) Dhruv Batra Slide Credit: Yaser Abu-Mostapha

Basic Steps of Supervised Learning Set up a supervised learning problem Data collection Start with training data for which we know the correct outcome provided by a teacher or oracle. Representation Choose how to represent the data. Modeling Choose a hypothesis class: H = {g: X  Y} Learning/Estimation Find best hypothesis you can in the chosen class. Model Selection Try different models. Picks the best one. (More on this later) If happy stop Else refine one or more of the above (C) Dhruv Batra

Learning is hard! No assumptions = No learning (C) Dhruv Batra

Klingon vs Mlingon Classification Training Data Klingon: klix, kour, koop Mlingon: moo, maa, mou Testing Data: kap Which language? Why? (C) Dhruv Batra

Training vs Testing What do we want? Training Data: Testing Data Good performance (low loss) on training data? No, Good performance on unseen test data! Training Data: { (x1,y1), (x2,y2), …, (xN,yN) } Given to us for learning f Testing Data { x1, x2, …, xM } Used to see if we have learnt anything (C) Dhruv Batra

Concepts Capacity Overfitting Generalization Measure how large hypothesis class H is. Are all functions allowed? Overfitting f works well on training data Works poorly on test data Generalization The ability to achieve low error on new test data (C) Dhruv Batra

Loss/Error Functions How do we measure performance? Regression: L2 error Classification: #misclassifications Weighted misclassification via a cost matrix For 2-class classification: True Positive, False Positive, True Negative, False Negative For k-class classification: Confusion Matrix (C) Dhruv Batra

Procedural View Training Stage: Testing Stage Raw Data  x (Feature Extraction) Training Data { (x,y) }  f (Learning) Testing Stage Test Data x  f(x) (Apply function, Evaluate error) (C) Dhruv Batra

Statistical Estimation View Probabilities to rescue: x and y are random variables D = (x1,y1), (x2,y2), …, (xN,yN) ~ P(X,Y) IID: Independent Identically Distributed Both training & testing data sampled IID from P(X,Y) Learn on training set Have some hope of generalizing to test set (C) Dhruv Batra

Guarantees 20 years of research in Learning Theory oversimplified: If you have: Enough training data D and H is not too complex then probably we can generalize to unseen test data (C) Dhruv Batra

Image Credit: Wikipedia (C) Dhruv Batra Image Credit: Wikipedia

New Topic: Nearest Neighbours (C) Dhruv Batra Image Credit: Wikipedia

Synonyms Nearest Neighbors k-Nearest Neighbors Member of following families: Instance-based Learning Memory-based Learning Exemplar methods Non-parametric methods (C) Dhruv Batra

Nearest Neighbor is an example of…. Instance-based learning x1 y1 x2 y2 x3 y3 . xn yn Has been around since about 1910. To make a prediction, search database for similar datapoints, and fit with the local points. Assumption: Nearby points behavior similarly wrt y (C) Dhruv Batra

Instance/Memory-based Learning Four things make a memory based learner: A distance metric How many nearby neighbors to look at? A weighting function (optional) How to fit with the local points? (C) Dhruv Batra Slide Credit: Carlos Guestrin

1-Nearest Neighbour Four things make a memory based learner: A distance metric Euclidean (and others) How many nearby neighbors to look at? 1 A weighting function (optional) unused How to fit with the local points? Just predict the same output as the nearest neighbour. (C) Dhruv Batra Slide Credit: Carlos Guestrin

k-Nearest Neighbour Four things make a memory based learner: A distance metric Euclidean (and others) How many nearby neighbors to look at? k A weighting function (optional) unused How to fit with the local points? Just predict the average output among the nearest neighbours. (C) Dhruv Batra Slide Credit: Carlos Guestrin

1 vs k Nearest Neighbour (C) Dhruv Batra Image Credit: Ying Wu

1 vs k Nearest Neighbour (C) Dhruv Batra Image Credit: Ying Wu

Nearest Neighbour Demo 1 Demo 2 http://cgm.cs.mcgill.ca/~soss/cs644/projects/perrier/Nearest.html Demo 2 http://www.cs.technion.ac.il/~rani/LocBoost/ (C) Dhruv Batra

Spring 2013 Projects Gender Classification from body proportions Igor Janjic & Daniel Friedman, Juniors (C) Dhruv Batra

Scene Completion [Hayes & Efros, SIGGRAPH07] (C) Dhruv Batra

Hays and Efros, SIGGRAPH 2007 Now we take our gist (and mask and color image) and find it’s L2 nearest neighbors in the database of 2.3 million images. Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 … 200 total Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 Context Matching Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 Graph cut + Poisson blending Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 not just for the cases where the data needed simply isn't available in the source image (show several such examples) Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 not just for the cases where the data needed simply isn't available in the source image (show several such examples) Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 not just for the cases where the data needed simply isn't available in the source image (show several such examples) Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007

Hays and Efros, SIGGRAPH 2007 Now we take our gist (and mask and color image) and find it’s L2 nearest neighbors in the database of 2.3 million images. Hays and Efros, SIGGRAPH 2007

TODO HW0 Due Tonight at 11:55pm Reading: Barber Chap 14. (C) Dhruv Batra