2 Dr Alok Kumar Logistic regression applications Dr Alok Kumar 3 When is logistic regression suitable Dr Alok Kumar 4 Question Which of the following sentences are TRUE about Logistic Regression ID: 1027464
Download Presentation The PPT/PDF document "Logistic Regression What is logistic reg..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1. Logistic Regression
2. What is logistic regression?2Dr. Alok Kumar
3. Logistic regression applicationsDr. Alok Kumar3
4. When is logistic regression suitableDr. Alok Kumar4
5. QuestionWhich of the following sentences are TRUE about Logistic Regression?Logistic regression is analogous to linear regression but takes a categorical/discrete target field instead of a numeric one.Logistic Regression measures the probability of a case belonging to a specific class.Logistic Regression can be used to understand the impact of a feature on a dependent variable.Dr. Alok Kumar5
6. Email: Spam / Not Spam?Online Transactions: Fraudulent (Yes / No)?Tumor: Malignant / Benign ?0: “Negative Class” (e.g., benign tumor) 1: “Positive Class” (e.g., malignant tumor)
7. Tumor SizeThreshold classifier output at 0.5:If , predict “y = 1”If , predict “y = 0”Tumor SizeMalignant ?(Yes) 1(No) 0
8. Classification: y = 0 or 1can be > 1 or < 0Logistic Regression:
9. LogisticRegressionHypothesisRepresentation
10. Sigmoid functionLogistic functionLogistic Regression ModelWant10.50
11. Interpretation of Hypothesis Output= estimated probability that y = 1 on input x Tell patient that 70% chance of tumor being malignant Example: If “probability that y = 1, given x, parameterized by ”
12. LogisticRegressionDecision boundary
13. Logistic regression Suppose predict “ “ if predict “ “ ifz1
14. Sigmoid functionLogistic functionLogistic Regression ModelWant10.50
15. Logistic regression Suppose predict “ “ if predict “ “ ifz1
16. x1x2Decision Boundary123123Predict “ “ if
17. Non-linear decision boundariesx1x2Predict “ “ if x1x21-1-11
18. LogisticRegressionCost function
19. Training set:How to choose parameters ?m examples
20. Cost functionLinear regression:“non-convex”“convex”
21. Logistic regression cost functionIf y = 110
22. Logistic regression cost functionIf y = 010
23.
24. LogisticRegressionSimplified cost function and gradient descent
25. Logistic regression cost function
26. Logistic regression cost function
27. Output Logistic regression cost functionTo fit parameters : To make a prediction given new :
28. Gradient DescentWant :Repeat(simultaneously update all )
29. Gradient DescentWant :(simultaneously update all )RepeatAlgorithm looks identical to linear regression!
30.
31.
32. RegularizationThe problem ofoverfitting
33. Example: Logistic regression( = sigmoid function)x1x2x1x2x1x2
34. Addressing overfitting:Options:Reduce number of features.Manually select which features to keep.Regularization.Keep all the features, but reduce magnitude/values of parameters .Works well when we have a lot of features, each of which contributes a bit to predicting .
35. Regularized logistic regression.Cost function:x1x2
36. Gradient descentRepeat
37. LogisticRegressionMulti-class classification: One-vs-all
38. Multiclass classificationEmail foldering/tagging: Work, Friends, Family, HobbyMedical diagrams: Not ill, Cold, FluWeather: Sunny, Cloudy, Rain, Snow
39. x1x2x1x2Binary classification:Multi-class classification:
40. x1x2One-vs-all (one-vs-rest):Class 1:Class 2:Class 3:x1x2x1x2x1x2
41. One-vs-allTrain a logistic regression classifier for each class to predict the probability that .On a new input , to make a prediction, pick the class that maximizes