Classification examples:
1, multiclass classifier
input : web page
output : what the web page is about, education, finance or technology
2, spam filtering
input : text of email, ip, sender...
output : spam or not spam
3, image classification
input : image pixels
output : predicted object
4, personalized medical diagnosis
input : temperature, x-ray result, lab test result, DNA, life style
output : healthy, flu, cold, pneumonia...
5, reading your mind
input : FMRI image
output : what are you reading, what are you looking at
Overview of content
1, Models
linear classifiers
logistic regression : probability
decision trees : provide non linear feature for the data, example : whether a loan is risky or safe
ensembles
2, Algorithms
Gradient, Stochastic gradient, Recursive greedy, Boosting using AdaBoost
3, Core ML
Alleviating overfitting, handling missing data, precision recall, online learning
Linear Classifiers
Logistic regression : the most commonly used linear classifiers and one of the most useful ones.
1, Linear classifier : a motivating example
Classifying sentiment of review, build a sentence sentiment classifier, given a sentence, is it a positive sentiment or negative sentiment?
2, Intuition behind linear classifier:
split our data into training set and validation set, then we will feed our traning dataset to some learning algorithm to learn the weights associated with each word, finally we will go back to evaluate its accuracy on that validation set.
3, Decision boudaries
A boundary between positive predictions and negative predictions.
when 2 coefficients are non-zero, it‘s a line, when 3 coefficients are non-zero, it‘s a plane, when many coefficients are non-zero, it‘s a hyperplane.
Class probabilities
1, Predict class probabilities
In logistic regression, we don‘t just predict plus one or minus one, we predict a probability, how likely is this review to be positive? how likely is this review to be negative? probabilities give us an indication of how sure we are about predictions we make.
2, Using probabilities in classification
Logistic regression
1, Predicting class probabilities with (generalized) linear models
2, The sigmoid (or logistic) link function
3,