Learning outcomes

After this lesson, you will be able to:

The central question

If a complex model makes fewer mistakes but is difficult to audit, while a transparent model performs slightly worse, which one should we choose?

1. Why accuracy is not the only criterion

Imagine a system that estimates whether an industrial pump will fail within the next seven days. Model A classifies 91% of cases correctly; model B reaches 94%. At first glance, B seems preferable. But suppose B is a complex ensemble and an engineer cannot trace why a particular pump received a high-risk score. Model A is a small decision tree whose prediction can be followed through a short sequence of conditions.

Real deployment requires more than an average test score. We need to know which errors occur, whether predictions are stable, whether decisions can be checked, and who is accountable for their consequences. In safety-critical, financial, or rights-affecting settings, explanation and auditability may be deployment requirements rather than optional extras.

Predictive performance describes how well predictions match outcomes on new data. Interpretability describes how accessible the model's logic is to people: which relationships it uses, how its behaviour is structured, and how an output is reached.

Accuracy–interpretability trade-offA model-selection situation in which improving predictive performance may come with greater complexity and lower transparency. This can happen, but it is not inevitable: an interpretable model can sometimes perform just as well or better.
Important: the trade-off is not a law of nature and does not mean simple models are always worse. It is a framework for comparing particular models on a particular task and dataset.

2. What exactly are we comparing?

People often use “accuracy” as a generic synonym for quality, although Accuracy is only one metric. For binary classification, inspect the confusion matrix and choose metrics that reflect the cost of different errors.

CriterionQuestionPossible measures
Predictive performanceHow well does the model work on unseen cases?Accuracy, Precision, Recall, F1, ROC-AUC, PR-AUC; MAE and RMSE for regression
ComplexityHow complicated is the model structure?Number of features, coefficients, nodes and tree levels; number of ensemble components
InterpretabilityCan a person understand the model's logic?Readable rules, traceable predictions, understandable feature effects
StabilityHow much does behaviour change when data changes?Metric variation, stability of structure and predictions across retraining
AuditabilityCan the system be checked and documented?Reproducibility, logs, data and model versions, testable constraints
Practical costWhat do errors and operation cost?Missed failures, false alarms, delays, inspection and maintenance costs

Accuracy can be misleading when the positive class is rare. If only 1% of pumps fail, a classifier that always predicts “no failure” achieves 99% Accuracy while detecting no failures. Metrics must therefore follow the task.

Recall is the share of actual positive cases detected. Precision is the share of positive predictions that are correct. F1 combines Precision and Recall using their harmonic mean. None of these metrics replaces an analysis of the consequences of errors.

AccuracyAccuracy = (TP + TN) / (TP + TN + FP + FN)TP: true positives; TN: true negatives; FP: false positives; FN: false negatives.
PrecisionPrecision = TP / (TP + FP)Correct positive predictions divided by all positive predictions.
RecallRecall = TP / (TP + FN)Detected positive cases divided by all actual positive cases.
F1-scoreF1 = 2 × Precision × Recall / (Precision + Recall)The harmonic mean of Precision and Recall; it does not directly encode error costs.

3. Interpretability by design and post-hoc explanations

Some models expose their logic directly through parameters or rules. A linear model, for example, computes a weighted sum of features; a small decision tree applies a sequence of conditions. These are often called interpretable by design.

Other models, such as large ensembles and neural networks, have more complex internal structures. Post-hoc methods—feature importance, local explanations, or surrogate models—can help investigate them. Such explanations do not automatically make the original model transparent.

Model familyWhat can be inspected directlyTypical limitation
Linear / logistic regressionCoefficients and feature-effect direction under a suitable specificationNon-linearity and interactions may require engineered terms; coefficients depend on scale and correlations
Small decision treeRules along the path from root to leafDeep trees become hard to read and may be unstable
GAM / EBMIndividual feature-effect functions and, in some models, interactionsMany features and interactions can make the model harder to inspect
Random forest / gradient boostingAggregate summaries and individual trees, when availableThe overall prediction combines many components
Neural networkArchitecture and parameters can be inspected technicallyA human-readable account of an individual prediction rarely follows directly from the weights

Do not confuse model interpretability with the quality of one explanation. A feature-importance plot does not establish causality. A local explanation may describe behaviour around one case without accurately describing the entire model.

Check your understanding: if SHAP or LIME is used to explain a complex model, has the model become interpretable by design? No. We have added an analysis tool; the model's internal structure has not changed.

4. The Pareto frontier: when not everything can improve at once

Suppose we compare candidate models on two dimensions: predictive quality and interpretability. Some models are more accurate; others are easier to understand. A set of solutions may exist for which one criterion cannot be improved without making another worse. These solutions form a Pareto frontier.

Pareto dominanceModel X dominates model Y if X is at least as good as Y on every criterion being considered and strictly better on at least one.
Pareto frontier: the trade-off between predictive performance and interpretability Blue points A–D form an illustrative Pareto frontier. Grey points E–H are dominated by the corresponding blue points. Point labels are placed in separate high-contrast tags. The legend stays within the illustration. Interpretability — increases to the right → Predictive performance — increases upward → Pareto frontier A B C D E F G H A–D: non-dominated options E–H: dominated options dominance example
Conceptual illustration, not experimental results. Each grey point is dominated by its corresponding blue point: the blue model is no worse on both criteria and strictly better on at least one. The blue points show trade-off options. The Pareto frontier identifies non-dominated solutions but does not automatically select a winner; the choice depends on task requirements.

The Pareto frontier does not select a winner. It helps remove clearly dominated candidates and reveals the meaningful alternatives. We then apply constraints such as minimum Recall, response-time limits, explanation requirements, maintenance budgets, and acceptable risk.

Real projects usually involve more than two criteria: performance, interpretability, cost, latency, stability, and fairness may all matter. A two-axis plot is a simplification, not a complete decision model.

5. Error costs can change the model choice

Consider two types of error in pump-failure prediction:

  • False Negative (FN): the model fails to warn about a failure that occurs. This may cause downtime, equipment damage, or a safety hazard.
  • False Positive (FP): the model warns about a failure that does not occur. This may trigger unnecessary inspection, expense, or production stoppage.

If FN is much more costly than FP, high Recall may matter more even if false alarms increase. If inspections are expensive, Recall and Precision must be balanced. The classification threshold and response policy should be set with process owners, not chosen solely by maximizing F1.

Simplified error costCost = C_FP × FP + C_FN × FNC_FP and C_FN are the costs of false positives and false negatives. Inspection, maintenance, and delay costs may also be included.

Cost estimates must be justified by domain knowledge. If consequences cannot be meaningfully expressed in money, use constraints or risk levels. Safety, human rights, and trust should not be mechanically reduced to an arbitrary monetary value.

Interpretability matters when a specialist must review or challenge a recommendation, or explain it to an auditor. But transparency alone does not make a model safe: a readable rule can still be wrong, outdated, or based on biased data.

6. Practical experiment: four models for pump-failure prediction

We will compare four model families on one task. This is a teaching experiment design, not a published benchmark. The figures below are illustrative and are included to practise analysis; a real experiment must replace them with results from a consistent evaluation protocol.

6.1. Experimental setup

The goal is to predict whether a pump will fail within the next seven days. An observation represents a pump during a particular period. Features may include vibration, temperature, pressure, operating hours, and maintenance history. The target records whether a failure occurs within the specified time window.

  1. Split data into training, validation, and test periods chronologically so future information is not used to predict the past.
  2. Remove target leakage and features that become available only after a failure.
  3. Use the same available features and test period for every candidate model.
  4. Tune hyperparameters using training and validation data only.
  5. Evaluate on the held-out test set; for rare failures, inspect Precision–Recall and the confusion matrix.
  6. Repeat evaluation across multiple time windows to assess stability.

6.2. Illustrative results

ModelRecallPrecisionF1Illustrative interpretabilityMain trade-off
Logistic regression0.780.700.74High with a suitable specificationSimple form, but limited flexibility without transformations and interactions
Small decision tree0.740.760.75High when shallowRules are traceable, but instability and lower performance are possible
Random forest0.840.750.79Medium to low at the whole-model levelCaptures complex relationships but combines many trees
Gradient boosting0.870.780.82Lower without additional analysis toolsHighest illustrative F1, but harder to audit as a whole

In this example, boosting has the highest F1, but that does not automatically make it the deployment choice. If the minimum acceptable Recall is 0.85, it meets the illustrative constraint while the other candidates do not. If every decision must be explained through a short, readable rule set, another model or an additional review procedure may be necessary.

6.3. How to interpret the results

  • Do not compare models evaluated on different test sets or preprocessing rules.
  • Do not draw conclusions from a single metric.
  • Inspect confidence intervals or metric variation when the data supports such estimates.
  • Analyse errors separately for important operating conditions and equipment groups.
  • Record which explanations are available to model users and how reliable they are.
Experiment takeaway: do not choose a model simply because it ranks first on one metric. First check mandatory requirements, then compare non-dominated candidates and assess the consequences of using them.

7. A practical model-selection matrix

Before deployment, write down the requirements. This matrix does not replace expert judgement, but it makes the grounds for a choice explicit.

QuestionWhat to recordExample requirement
What do FN and FP cost?Consequences of each error typeA missed critical failure is unacceptable; a false alarm requires inspection
What minimum quality is required?Metric, threshold, and test protocolRecall must exceed an agreed level on a temporal test set
Who uses the prediction?Role, expertise, and ability to challenge itAn engineer can see key factors and source measurements
What is needed for an audit?Versions, logs, data, and explanationsA reproducible prediction and retained model version
How is drift monitored?Post-deployment data and performance monitoringRegular checks of distributions and errors

A disciplined selection process looks like this:

  1. Define the task, users, and consequences of errors.
  2. Set mandatory constraints for quality, safety, latency, and explanation.
  3. Train several reasonable candidates on the same data.
  4. Exclude candidates that violate mandatory requirements or are dominated by alternatives.
  5. Compare the remaining models on the Pareto frontier and test realistic use scenarios.
  6. Document the choice, limitations, monitoring, and conditions for reconsideration.

8. Limitations and common reasoning mistakes

  • “A more complex model is always more accurate.” No. It may overfit, fail to generalize, or perform poorly with limited data.
  • “A simple model is always easy to understand.” Not necessarily. A large linear model with many interactions or a deep tree can be difficult to inspect.
  • “High Accuracy means reliability.” No, especially with class imbalance and costly rare-event misses.
  • “A post-hoc explanation proves why the model decided.” It describes a selected aspect of model behaviour and depends on the method, data, and assumptions.
  • “An interpretable model is automatically trustworthy.” Readability does not guarantee correctness, fairness, stability, or safety.
  • “There is one best model for every task.” The choice depends on constraints, users, and the consequences of errors.

9. Lesson summary

  • Predictive performance and interpretability answer different questions and should be assessed separately.
  • A trade-off is possible, but it is not an inevitable law.
  • The Pareto frontier removes dominated candidates; it does not choose a winner for us.
  • FN and FP costs, audit requirements, and user roles change the selection criteria.
  • Post-hoc explanations are useful but do not make a complex model interpretable by design.
  • Responsible selection requires a consistent comparison protocol, stability checks, and documented limitations.
Main takeaway

The best model is not necessarily the most accurate or the simplest. It is the model that meets the task's requirements, offers acceptable performance and risk, and can be checked to the level required by its application.

What comes next

In the next lesson, we will study non-linear models with interpretable structures and see how to move beyond simple linear relationships while retaining insight into feature effects.

Open the knowledge map ↗

Sources and further reading

  1. scikit-learn: Model evaluation — Classification metrics, confusion matrices, and model evaluation.
  2. Christoph Molnar: Interpretable Machine Learning — Interpretable models, post-hoc explanations, and methodological limitations.
  3. Rudin (2019): Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead — Why inherently interpretable models matter in high-stakes settings.
  4. Sokolova & Lapalme (2009): A systematic analysis of performance measures for classification tasks — A systematic review of classification metrics.

Lesson glossary

01Predictive performancePredictive performance

A model's ability to predict target values correctly on new data.

02InterpretabilityInterpretability

The extent to which a person can understand a model's logic or meaningfully inspect its behaviour.

03Pareto dominancePareto dominance

A situation where one option is no worse on every criterion and strictly better on at least one.

04False positiveFP

The model predicts an event that did not actually occur.

05False negativeFN

The model fails to detect an event that actually occurred.

06Post-hoc explanationPost-hoc explanation

An analysis of an already trained model using an additional explanation method.

Knowledge check

Choose one answer for each question and select “Check answer”. Feedback explains the underlying principle.

1. Two candidate models differ in performance and transparency. How should we choose?

2. What does it mean for model X to Pareto-dominate model Y?

3. Why can Accuracy be misleading when failures are rare?

4. If missing a failure is much more costly than a false alarm, what should receive particular attention?

5. What changes when a post-hoc explanation is generated for a neural network?