Model Evaluation Flashcards

1
Q

Accuracy

A

Measures the proportion of correctly classified predictions in the model.

Accuracy = (TP+TN)/(TP+TN+FN+FP)

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

Sensitivity / Recall

A

True positive rate (TPR)

TPR = TP/(TP+FN)

Looking at all the actual positives, how many of them correctly classified as positive?

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

Specificity

A

True negative rate (TNR)

TNR = TN/(TN+FP)

Looking at all the actual negatives, how many of them were correctly classified as negative?

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

Precision

A

Precision = TP/(TP+FP)

Look at all predicted positives cases, how many of them were correctly classified as positive?

“If I predict something negative and it’s wrong, it’s fine, but let the ones predicted “positive” be good!

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

ROC Curve

A

Confusion matrix is at the basis of the Receiver Operating Characteristic (ROC) curve.

The ROC curve allows to compare different models of classification. Each point in the ROC curve corresponds to a different cut-off thresholds of the model.

X axis - rate of false positives / (amongst all negatives) (1 - specificity) → indicator of how well one classifies negative cases.

Y axis - rate of true positives / (amongst all positives) (sensitivity) → indicator of how well one classifies positive cases.

Depending on what your priorities are, you might choose a model that allows more or less of either.

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

AUC

A

Sometimes the curves of the chart does not clearly show which model performs better. The AUC metric can help.

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

Gain Chart

A

have a population of customers. On average, 10% of our customers end up buying the product. We want to select a subgroup of our population whom to send marketing emails, 60% of which will buy the product. Hence we want out model to predict the people that will buy the product. We want a high True Positive Rate (sensitivity).

The gain chart shows us how our models’ target metric (sensitivity) changes when we change sample size, as we send more marketing emails.

The greater the distance between the lift curve and the baseline, the better the model.

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

Lift Chart

A

The lift chart shows how many times will the target in the selected sample increase with respect to the random sample, with increasing percentage of the population.

Lift is calculated as the ration between the results in the target, obtained with and without the model.

If we contact only 10% of the population, when customers contacted are chosen with a model, the response rate is 35%, and with random sampling the response rate is 10%.

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

Kolmogorov-Smirnov graph

A

a measure of the degree of separation between the positives and negative distributions.

K-S-Value = 100, population divided into two completely separate groups, one containing positives, other negatives.

K-S-Value = 0, the model is not able to differentiate between positive and negatives, then the model works as a random selection.

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

Akaike Information Criterion

A

Combines the goodness of the model with its complexity, measured by the number of independent variables.

AIC = -2\log (hat(L)) + 2(k+1)

Where hat(L) is the maximum of the likelihood function and k the number of independent variables.

The lower the better!

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

MacFadden’s R2

A

1 - (LL_fullmodel/ LL_intercept)

Compares LL of model with LL of a model with only the intercept. The closer to 1, the better. Values tend to be smaller, and values such as 0.2 or 0.4 can be considered satisfactory.

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

R2 of Cox and Snell

A

R_cs2 = 1-exp[-2/n [LL(B)-LL(0)]]

Takes into account also the size of the data sample.

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

Nagelkerke R2

A

R_N2 = R_{CS}^2 / R_{MAX}^2

where

R_MAX^2 = 1- exp[2/n-LL(0)]

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

Measures for Quantitative target model evaluation

A

MAE - Mean Absolute Error
MSE - Mean Squared Error
MPE - Mean Percentage Error
MAPE - Mean Absolute Percentage Error

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