Linear classifiers Review and multiclassification Image source Stanford

  • Slides: 34
Download presentation
Linear classifiers: Review and multi-classification Image source: Stanford CS 231 n

Linear classifiers: Review and multi-classification Image source: Stanford CS 231 n

Review: Training linear classifiers

Review: Training linear classifiers

General recipe empirical loss regularization data loss

General recipe empirical loss regularization data loss

Model 1: Linear regression

Model 1: Linear regression

Model 2: Logistic regression • Data loss:

Model 2: Logistic regression • Data loss:

Model 2: Logistic regression Incorrectly classified Correctly classified

Model 2: Logistic regression Incorrectly classified Correctly classified

Model 2: Logistic regression

Model 2: Logistic regression

Model 3: Perceptron training algorithm

Model 3: Perceptron training algorithm

Model 3: Perceptron training algorithm • Data loss:

Model 3: Perceptron training algorithm • Data loss:

Model 3: Perceptron training algorithm Incorrectly classified Correctly classified

Model 3: Perceptron training algorithm Incorrectly classified Correctly classified

Model 4: Support vector machines • Data loss:

Model 4: Support vector machines • Data loss:

Model 4: Support vector machines Perceptron hinge loss SVM hinge loss Incorrectly classified Correctly

Model 4: Support vector machines Perceptron hinge loss SVM hinge loss Incorrectly classified Correctly classified

Model 4: Support vector machines

Model 4: Support vector machines

Summary of data losses Incorrectly classified Correctly classified Image source

Summary of data losses Incorrectly classified Correctly classified Image source

Summary of SGD updates

Summary of SGD updates

Multi-classification

Multi-classification

Multi-classification: Overview 1. Multi-class perceptrons 2. Multi-class SVM 3. Softmax

Multi-classification: Overview 1. Multi-class perceptrons 2. Multi-class SVM 3. Softmax

One-vs-all classification Argmax Inputs

One-vs-all classification Argmax Inputs

Multi-class perceptrons Figure source: Stanford 231 n

Multi-class perceptrons Figure source: Stanford 231 n

Multi-class perceptrons

Multi-class perceptrons

Multi-class perceptrons

Multi-class perceptrons

Multi-class perceptrons

Multi-class perceptrons

Multi-class perceptrons Independent Multi-class Cat score: 65. 1 Do nothing Increase Dog score: 101.

Multi-class perceptrons Independent Multi-class Cat score: 65. 1 Do nothing Increase Dog score: 101. 4 Decrease Ship score: 24. 9 Decrease Do nothing

Multi-class SVM Score for correct class has to be greater than the score for

Multi-class SVM Score for correct class has to be greater than the score for the incorrect class by at least a margin of 1 Score for correct class – score for incorrect class Source: Stanford 231 n

Multi-class SVM

Multi-class SVM

Softmax

Softmax

Note on numerical stability

Note on numerical stability

Softmax and sigmoid

Softmax and sigmoid

Cross-entropy loss Correct class

Cross-entropy loss Correct class

Cross-entropy loss

Cross-entropy loss

SGD with cross entropy loss

SGD with cross entropy loss

SGD with cross-entropy loss

SGD with cross-entropy loss

SVM vs. softmax Correct class is the third one (blue) Source: Stanford 231 n

SVM vs. softmax Correct class is the third one (blue) Source: Stanford 231 n

Assignment 1 is out – due Tuesday, Sept. 22 http: //slazebni. cs. illinois. edu/fall

Assignment 1 is out – due Tuesday, Sept. 22 http: //slazebni. cs. illinois. edu/fall 20/assignment 1. html