# ▸ Logistic Regression :

1. Suppose that you have trained a logistic regression classifier, and it outputs on a new example a prediction $\inline&space;h_\theta(x)$ = 0.2. This means (check all that apply):
• Our estimate for P(y = 1|x; θ) is 0.8.
h(x) gives P(y=1|x; θ), not 1 - P(y=1|x; θ)
• Our estimate for P(y = 0|x; θ) is 0.8.
Since we must have P(y=0|x;θ) = 1 - P(y=1|x; θ), the former is
1 - 0.2 = 0.8.
• Our estimate for P(y = 1|x; θ) is 0.2.
h(x) is precisely P(y=1|x; θ), so each is 0.2.
• Our estimate for P(y = 0|x; θ) is 0.2.
h(x) is P(y=1|x; θ), not P(y=0|x; θ)

1. Suppose you have the following training set, and fit a logistic regression classifier $\inline&space;h_\theta(x)&space;=&space;g(\theta_0&space;+&space;\theta_1x_1&space;+&space;\theta_2x_2)$.

Which of the following are true? Check all that apply.

1. For logistic regression, the gradient is given by $\inline&space;\frac{\partial&space;}{\partial&space;\theta_j&space;}&space;J(\theta)&space;=&space;\frac{1}{m}&space;\sum_{i=1}^{m}(h_\theta(x^{(i)})-y^{i})x^{(i)}_j$. Which of these is a correct gradient descent update for logistic regression with a learning rate of $\inline&space;\alpha$ ? Check all that apply.

1. Which of the following statements are true? Check all that apply.

### Check-out our free tutorials on IOT (Internet of Things):

1. Suppose you train a logistic classifier $\inline&space;h_\theta(x)&space;=&space;g(\theta_0&space;+&space;\theta_1x_1&space;+&space;\theta_2x_2)$. Suppose $\inline&space;\theta_0&space;=&space;6$, $\inline&space;\theta_1&space;=&space;-1$, $\inline&space;\theta_2&space;=&space;0$. Which of the following figures represents the decision boundary found by your classifier?
• Figure:

In this figure, we transition from negative to positive when x1 goes from left of 6 to right of 6 which is true for the given values of θ.
• Figure:

• Figure:

• Figure:

&
Click here to see more codes for Raspberry Pi 3 and similar Family.
&
Click here to see more codes for NodeMCU ESP8266 and similar Family.
&
Click here to see more codes for Arduino Mega (ATMega 2560) and similar Family.

Feel free to ask doubts in the comment section. I will try my best to answer it.
If you find this helpful by any mean like, comment and share the post.
This is the simplest way to encourage me to keep doing such work.

Thanks & Regards,
- APDaga DumpBox