← All posts

Classic MAPE: Mean Absolute Prediction Error and Bootstrap Internal Validation

Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics
Classic MAPE: Mean Absolute Prediction Error and Bootstrap Internal Validation
On this page

Apparent Performance and Internal Validation Using Bootstrap


1. Introduction

In clinical prediction models, performance is commonly evaluated using metrics such as:

However, an additional intuitive metric is:

Mean Absolute Prediction Error (MAPE)

This metric directly quantifies how far predicted probabilities are from actual outcomes.


2. Definition of MAPE (classic form)

Here MAPE means the mean absolute error between predicted probabilities and observed binary outcomes—on the probability scale (0–1), not the textbook “percentage error” formula often also called MAPE in other fields.

MAPE=1ni=1n|p^i-yi|

Where:

👉 This is mathematically equivalent to Mean Absolute Error (MAE) applied to predicted probabilities.


3. Interpretation of MAPE

MAPE represents:

Average absolute difference between predicted risk and actual outcome

Example:

If average across all patients = 0.25 → On average, predictions are 25% away from the truth


4. Apparent MAPE

Definition

Apparent MAPE is calculated using:

MAPEapparent=1n|p^imodel-yi |

Key Insight (Important)

Even on training data:

MAPE ≠ 0

Why?

👉 Therefore, error always exists, even in training data


Interpretation


5. Internal Validation Using Bootstrap

To correct for optimism, bootstrap resampling is used.

Algorithm (e.g., 500 iterations)

For each bootstrap iteration (b):


Step 1 – Resample


Step 2 – Fit model


Step 3 – Apparent performance (app_b)

MAPEapp(b)

(This is optimistic)


Step 4 – Test performance (test_b)

MAPEtest(b)

(This is more realistic)


Step 5 – Optimism

optimism(b)=MAPEapp(b)-MAPEtest(b)

Because training error is lower:

👉 optimism is typically negative


6. Optimism-Corrected MAPE

After all bootstrap iterations:

Meanoptimism=1Boptimism(b)

Then:

MAPEcorrected=MAPEapparent-Meanoptimism

Key Property

Since:

Then:

Corrected MAPE > Apparent MAPE


Interpretation

Corrected MAPE represents:

Expected prediction error in new patients from the same population


7. Comparison with AUROC

Metric Measures Clinical meaning
AUROC Discrimination Can the model rank high vs low risk?
MAPE Absolute error How close predicted risks are to truth

Important Insight

A model can have:

👉 Therefore, MAPE adds complementary information


8. Role of MAPE in Clinical Research

MAPE is useful when:

However, it should be supplementary, not primary.


9. Key Takeaways

0
Message for International and Thai ReadersUnderstanding My Medical Context in ThailandRead more →Message for International and Thai ReadersUnderstanding My Broader Content Beyond MedicineRead more →

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment

Classic MAPE: Mean Absolute Prediction Error and Bootstrap Internal Validation — Uniqcret