L4: Classification Tasks Flashcards

After this deck: - Apply linear models to solving different classification problems; - Assess the accuracy of coefficient estimates and the accuracy of the model; - Produce analysis on the model output.;

1
Q

To predict whether or not an individual will default on his or her credit card payment, on the basis of gender, education, age, history of past payment, etc.

This is an example of what kind of task?

A

Classification: we are trying to predict a categorical response variable, Y given our feature vector X

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

Why can’t we use linear regression for classification tasks?

A

The linear regression model would produce probabilities less than 0 or larger than 1 when computing the likelihood of say, a defaulting borrower.

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

What is an alternative model that can be used for classification tasks?

A

The logistic function can be used to predict the likelihood of a binary category, and hence determine classes.

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

In logistic regression models, how does the coefficient alter the resulting model?

A

Unlike in linear regression, the coefficient affects the probability of the resulting category, not the category itself.

The coefficient affects the shape of the corresponding model, if positive (left), increasing the X will increase the Pr(Y=1). If negative (right), increasing the X will decrease the Pr(Y=1)

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

What is the statistic used to assess the accuracy of the coefficients?

A

The z-statistic.

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

Using the logistic regression formula, what is the estimated probability of default for a person with balance of $1000?

A

P(default=yes | balance = 1000) =

[e-10.65 + 0.0055 x 1000] / [1 + e-10.65 + 0.0055 x 1000] = 0.00576

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

How are the regression coefficients estimated in logistic regression?

A

Maximum likelihood is used. We find the maximum likelihood of the data, given the two coefficients (B0,B1).

That is, seek the B0 and B1 such that the predicted probability for each X corresponds as closely to the observed chance of Y

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

What is Linear Discriminant Analysis?

A

It is a classification method that utilises generative modelling. We attempt to estimate the within-class density of X, given the class label. We use Bayes’ formula and the prior probability to estimate the posterior probability of Y.

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

How does LDA differ from logistic regression?

A

LDA does not suffer from the unstable estimates of the classes that LogReg does.

Its decision boundaries between classes also mean better accuracy.

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

What is the misclassification rate?

What is the False Positive Rate?

What is the True Positive Rate?

A

With classification threshold = 0.5, we receive 23+252 / 10000 errors a 2.75% misclassification rate!

FPR = FP / [FP+TN]

The fraction of negative samples that are mis-classified

TPR = TP / [TP + FN]

The fraction of positive samples that are correctly classified

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

What is the misclassification rate?

A

With classification threshold = 0.5, we receive 23+252 / 10000 errors a 2.75% misclassification rate!

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

What is the misclassification rate?

A

With classification threshold = 0.5, we receive 23+252 / 10000 errors a 2.75% misclassification rate!

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

What is Quadratic Discriminant Analysis?

A

QDA is a variant of LDA in which an individual covariance matrix is estimated for every class of observations. QDA is particularly useful if there is prior knowledge that individual classes exhibit distinct covariances. A disadvantage of QDA is that it cannot be used as a dimensionality reduction technique.

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

Logistic regression is popular for classification when we have two classes, true or false?

A

True

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

LDA is useful when n is large, true or false?

A

False, it is useful when n is small

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