Logistic Regression (Classification Algorithm)
Classification Problem Email: Spam/Not Spam? Online Transactions: Fraudulent (Yes/No)? Tumor: Malignant/Benign
Classification Problem Email: Spam/Not Spam? Online Transactions: Fraudulent (Yes/No)? Tumor: Malignant/Benign Prediction Task:
Classification Problem Email: Spam/Not Spam? Online Transactions: Fraudulent (Yes/No)? Tumor: Malignant/Benign Prediction Task: This is an example of Binary Classification task. A generalized case of classification task in Multi-class Classification
Applying Linear Regression
Applying Linear Regression hθ(x)
Applying Linear Regression hθ(x)
Problem in Applying Linear Regression Yes(1) No(0) Tumor Size
Problem in Applying Linear Regression Yes(1) No(0) Tumor Size
Problem in Applying Linear Regression Yes(1) No(0) Tumor Size
Problem in Applying Linear Regression Yes(1) No(0) Tumor Size Benign if tumor size lies in this range Malignantif tumor size lies in this range
Problem in Applying Linear Regression
Hypothesis Representation hθ(x) = θTx
Hypothesis Representation g(z) Sigmoid function Logistic function z
Interpretation of Hypothesis Output hθ(x) = P(y=1|x;θ)
Interpretation of Hypothesis Output
Interpretation of Hypothesis Output g(z) z
Decision Boundary
Decision Boundary
Decision Boundary
Decision Boundary
Decision Boundary
Decision Boundary
Learning Task
Cost Function
Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Logistic Regression Cost Function
Gradient Descent
Gradient Descent
Gradient Descent Algorithm looks identical to linear regression
Multi-class Classification: One-vs-All Algorithm
Binary vs Multi-class Classification Problem
One-vs-All (one-vs-rest)
One-vs-All (one-vs-rest)
One-vs-All (one-vs-rest)
One-vs-All (one-vs-rest)
One-vs-All Algorithm