11-logistic regression Flashcards

1
Q

What is logistic regression?

A

Logistic regression is a binary classification model. It is a probabilistic discriminative model, because it optimises P(Y|x) directly. It doesn’t assume conditional independence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the log odds?

A

Log odds is a transformation used in the process of defining the logistic regression formula. It is calculated as the log(P(x) / (1-p(x)))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the logistic regression formula?

A

P(Y|x:theta) = 1/(1+e^-(regression formula))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How should the logistic regression function be interpreted?

A

If P(Y|X;theta) > 0.5, predict y = 1, otherwise y = 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does multinomial logistic regression compare to binomial logistic regression?

A

The probability of each class is calculated by passing through the softmax function, a generalisation of the sigmoid function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the pros of logistic regression?

A

It has a probabilistic interpretation
There are no restrictive assumptions on features
Often outperforms naive bayes
Particularly suited to frequency-based features

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the cons of logistic regression?

A

It can only learn linear feature-data relationships
There are some feature scaling issues
Often needs a lot of data to work well
Overfitting can be a big problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is cross-entropy loss and its relation to negative log likeli-
hood?

A

Cross-entropy measures the difference between two probability distributions, p and q.

H(p, q) = − ∑p(x)log(q(x))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens if perceptron is applied to non-linearly separable data?

A

It will likely not converge, it will instead oscillate between multiple solutions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is linear separability?

A

A dataset is linearly separable if we can separate all classes by drawing a line between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a linear classifier?

A

A classifier is linear if its decision boundary is a linear function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly