In the following Linear Regression discussion I didn't understand a few things:

So my questions are:

1. In the third slide: What does this probability means $$P\left(y_i|x_i\right)$$ and accordingly what does it mean to maximize it ? Does it mean to maximize both $$P\left(y_i=1|x_i\right)$$ and $$P\left(y_i=0|x_i\right)$$, and as higher this probability, the more stable and rightful results we get, and accordingly the more correct weights $$w^*$$ we get ?

2. In the fourth slide I don't see the math, could anyone detail it ? How did we get that result ?

• its just like replcae the p(y=1/x) and p(y=0/x) with the values given in the second slide and do the logarithmic operations. You will directly land on the desired result Jul 31 '20 at 18:49
• If you want me put, I will do that but takes time to type everything. And coming to the first question, No not exaclty, it doesn't mean to maximize both, according to the value of yi, one part of the L will be vanished, like if yi is 1 then L will be left with the first part only and viceversa. Jul 31 '20 at 18:53
• Just go through the cost function section in this link towardsdatascience.com/… , you will clearly understand the thing. Jul 31 '20 at 18:54
• I'll look at it later, and if I'll need more clarifications, I'll write them here according to your answer. I guess the math should be fine. Jul 31 '20 at 18:59
• Exactly, spot on. That's how the loss function is. Based on the value of yi, it maximizes the respective part Aug 1 '20 at 3:16