EX2
For logistic regression - solving classification
first dividing line can be seen from the drawing monohydric or dihydric
because binary classification, if direct prediction is multiplied by a function of θ x -y this does not guarantee that only the value 0 and 1. Thus by a change, add outside g, so that it is greater than the 0-1 range between 0.5 to less than 0.5 to 1 0
That is, if xθ, he is greater than 0, y is 1 then predict, if xθ is smaller than 0, y = 0 then predict
The nature of the loss function, use the log function, as predicted punishment is 0, predict the opposite of punishment infinite
h (theta) is the number you predict
to quantify show
y * log () ** is the dot product
Derivation loss function