# Logistic Regression Given `x`, we want `y^ = P(y=1 | x)` - If `x` is a picture, we want `y^` to tell us if it is a cat (probability value between 0 and 1) - Input parameters: `w` (an `nx` dimensional vector) and `b`, a real number - Those will be kept separate - - Output: `y^ = sigmoid(wTx + b)`, where `WTx + b` is `z` - ![[20230822171939 function.png]] - Where `w^Tx` is the `X` matrix transposed to `W` (the input of the training example) plus b * Given { (x^1, y^1), ... (x^m, y^m) }, we want `^y^(i) ~= y^(y)`. That is, after training, we want to find the same answer as the training set. To train a logistic regression model, we need to define a loss/error function: `L` * It is the function we use to measure the performance of our regression * It needs to help gradient descent (avoid local maximas) * For the loss function, a squared error function will create trouble as it has local maxima and can thus cause issues for gradient descent * What we use: * ![[20230822173030 function.png]]