#33 Machine Learning Specialization [Course 1, Week 3, Lesson 1]  Summary and Q&A
TL;DR
Logistic regression uses the sigmoid function to compute predictions. The decision boundary determines when to predict a value of 0 or 1.
Key Insights
 🖱️ Logistic regression uses the sigmoid function to compute predictions based on the calculated value of Z.
 😃 The decision boundary separates the predicted values of 0 and 1, determined by whether w dot X plus b is greater than or equal to 0 or less than 0.
 ❓ Polynomial features can be introduced to create more complex decision boundaries in logistic regression.
 ❓ The threshold of 0.5 is commonly used to determine the predicted value of 0 or 1.
 ✋ Logistic regression can fit complex data by including higherorder polynomial terms.
 Without higherorder polynomials, the decision boundary in logistic regression will always be a straight line.
 The decision boundary can be visualized as lines or curves in twofeature examples.
Transcript
in the last video you learned about the logistic regression model now let's take a look at the decision boundary to get a better sense of how logistic regression is Computing is predictions to recap here's how the logistic regression models outputs are computed in two steps in the first step you compute Z as w dot X plus b then you apply the sigmoi... Read More
Questions & Answers
Q: How does logistic regression compute predictions?
Logistic regression computes predictions in two steps: computing Z as w dot X plus b, then applying the sigmoid function to Z. The resulting value represents the probability of Y being equal to 1 given X and the parameters W and B.
Q: How does logistic regression decide whether to predict 0 or 1?
Logistic regression sets a threshold, usually 0.5, above which it predicts Y as 1 and below which it predicts Y as 0. If the sigmoid function output (f of X) is greater than or equal to 0.5, it predicts 1; otherwise, it predicts 0.
Q: What is the decision boundary in logistic regression?
The decision boundary is the line or curve that separates the predicted values of 0 and 1. It is determined by the value of w dot X plus b, where values greater than or equal to 0 predict 1 and values less than 0 predict 0.
Q: Can logistic regression have complex decision boundaries?
Yes, logistic regression can have complex decision boundaries by including higherorder polynomial terms in the model. By introducing additional features and adjusting the parameter values, the decision boundary can take various shapes, such as ellipses or curves.
Summary & Key Takeaways

Logistic regression models compute outputs in two steps: computing Z as w dot X plus b, then applying the sigmoid function to Z.

The sigmoid function, or logistic function, determines the probability that Y is equal to 1 given X and parameters W and B.

A threshold of 0.5 is commonly used to decide whether to predict 0 or 1, with values above the threshold predicting 1.