Logistic Regression Flashcards
What’s the equation for mean squared error? (multiple dimensions)
What’s the equation for the prediction of logistic regression?
sigmoid(thetaT*x) (I think)
What does logistic regression output?
Calculates the probability of each class, and takes the class with the highest probability. The prediction is based on the values of a set of independent variables.
What is this?
The output of logistic regression
What are some important characteristics to remember about logistic regression? (2)
- easily interpretable
- gives the probability of an event occurring, not just the predicted classification.
Can you apply linear regression to a classification problem?
Usually it’s a bad idea
What is the output of logistic regression?
The argmax of probabilities (between 0 and 1)
What is this?
The hypothesis of linear regression
What is the hypothesis of logistic regression in:
- words
- equation form
The hypothesis of linear regression fed into the sigmoid function
What does the graph of logistic regression look like?
Sigmoid function
- What is this?
- How do you interpret it?
- The probability expression of logistic regression’s output (before the argmax)
- Probability that y=1, given x, parametrized by theta
Do the outputs of logistic regression add up to exactly 1?
How should you think of the prediction of binary logistic regression?
Predict 1 when θTx >= 0.5. Otherwise, 0
How can you solve for the line of the decision boundary for binary logistic regression?
Essentially, setting theta transpose x (the hypothesis of linear regression) equal to 0 is the equation for the decision boundary.
Steps:
- Try to get theta transpose * x.
- Plug intercept value into theta transpose * x
- Set that equal to 0
- treat x2 as y and x1 as x and solve for the equation of the line
- If the line is over the origin, then the half-space that doesn’t contain the origin predicts 1. If it’s under the origin, the half-space with the origin predicts 1
What is important to remember about the decision boundary of binary logistic regression?
h(x) = 0.5