Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Machine Learning for Finance & Accounting Level Two · Lesson 8 of 9

Module Seven

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
8
Module 7: Model Evaluation, Interpretability & Ethics for Young Coders
⭐ Module 7 · Level Two

Model Evaluation,
Interpretability & Ethics

⚖️ A model isn't done when it works — it's done when it's honest

🎯 What you'll learn in this module

  • ✔ How to choose the right metric for financial outcomes
  • ✔ Cross‑validation strategies that respect finance's time‑ordered data
  • ✔ Interpretability with feature importance and partial dependence
  • ✔ What bias and fairness mean — and how to spot them
  • ✔ How to document models for audit and governance
  • ✔ How to communicate results to non‑technical stakeholders
💡
Why This Module Matters Most
The Big Idea

It's tempting to think a model is "done" when it has a nice accuracy number. But in finance, models make decisions that affect real people and real money. A "good" model that harms specific groups, hides its reasoning, or fails silently is actually a dangerous one.

This module is about the human part: how to evaluate honestly, explain clearly, audit fairly, and document properly. It's the difference between a hobby model and a professional one.

🏥 A doctor's medical training isn't just about diagnosing disease — it's about ethics, patient communication, and responsibility. Models need the same discipline.
🎯
Choosing the Right Metric for Finance
Evaluation

Different financial tasks need different metrics. Accuracy alone is almost never enough:

Task Wrong Metric Right Metric
Fraud detection Accuracy (99% is trivial) Precision, Recall, PR‑AUC
Credit scoring Raw accuracy AUC, Gini coefficient
Revenue forecast Any single number MAE, RMSE, MAPE
Expense categorizer Accuracy (biased to common labels) Macro‑F1, per‑class precision

The metric should reflect what actually costs money if the model gets it wrong.

📏 You don't measure distance with a stopwatch. Choose the tool that matches the job.
🔁
Cross‑Validation That Respects Time
Validation

Standard cross‑validation (k‑fold) shuffles the data randomly. That's fine for i.i.d. problems — but disastrous for time series, because it lets the model "peek into the future."

Use time‑series cross‑validation instead: train on the past, test on the future, and slide the window forward. Also called rolling‑origin or walk‑forward validation. Same as Module 5, but applied to every model comparison.

For non‑time financial data (like loan applications), use stratified k‑fold so rare classes appear in every fold — but never sort by time unless the outcomes were time‑independent.

📅 Train M1–M9
→
🔍 Test M10
→
📅 Train M1–M10
→
🔍 Test M11
🎓 You don't test a student on chapters they haven't studied yet. Models need the same discipline.
🔍
Interpretability: Feature Importance & Partial Dependence
Explainability

An interpretable model lets you answer "why did it decide that?" Two key tools:

Feature importance ranks inputs by how much they affect predictions. Global (across the whole model) or local (for one prediction).

Partial dependence plots show how the prediction changes as one feature varies, holding everything else fixed. "What happens to risk as income goes from $30k to $50k?"

These tools work for simple models (linear, trees) and black‑box models (via SHAP or LIME). In finance, explaining a single decision — not just an aggregate — is often legally required.

🔬 Interpretability is like an X‑ray: it reveals what's really inside, not just the outside appearance.
⚖️
Bias & Fairness: The Hard Questions
Fairness

Models learn from historical data — and historical data reflects historical bias. A credit model trained on decades of decisions might learn "reject applicants from neighborhood X" — because that's what the bank did, not because it's fair or accurate.

Two common fairness lenses:

Demographic parity: same approval rate across groups. Equal opportunity: same true‑positive rate (qualified people are equally likely to be approved).

These can conflict — you can't always satisfy both. The key is to measure, discuss, and document your tradeoffs. Fairness isn't a checkbox; it's a conversation.

Group A

72%
Approval rate

Group B

48%
Approval rate

Gap

24%
Worth investigating
🏀 A fair referee doesn't just count fouls — they ensure both teams get the same standard. Fairness metrics are how we check the referee.
📚
Documenting Models for Audit & Governance
Governance

Every model in production should come with a model card — a short document covering:

Purpose: what it does and who it's for. Training data: what data it used, when. Performance: metrics by subgroup. Limitations: what it can't do. Fairness audit: how groups compare. Owner and version: who's responsible, and which model is live.

Model cards make models auditable. If a regulator, auditor, or new team member asks "how does this work and can I trust it?" — the card answers.

📖 A model card is a model's passport: identity, history, and permissions in one document.
🎤
Communicating to Non‑Technical Stakeholders
Communication

Your CFO doesn't care about F1 or AUC — they care about money, risk, and decisions. Translate everything:

Instead of "precision = 0.82," say "when we flag a fraud, we're right 82% of the time." Instead of "MAE = $4,200," say "our forecast is typically off by about $4,200 per month — that's about 3% of average revenue."

Use one chart, one sentence, one decision per slide. The goal is not to impress — it's to help someone make a good decision.

🗣️ A translator doesn't teach you the language — they help you communicate. Translate your model's results for the business.
⚠️ The honesty trap: It's tempting to only report the metrics that look best. Resist it. Always report at least one metric that shows limitations, one failure mode, and one subgroup where performance is weaker. Honesty about weaknesses builds trust — and it's how finance professionals actually work.

🛠️ Hands-on activities (no boring stuff!)

1

Metric matching: Match five scenarios to the right metric: (a) rare fraud detection, (b) monthly cash flow forecast, (c) loan approval across groups, (d) expense categorization with 12 classes, (e) stock price prediction. Write one sentence justifying each choice.

2

CV story: Explain in two sentences why random k‑fold cross‑validation is dangerous for a model predicting monthly revenue. What would time‑series cross‑validation do differently?

3

Explain a prediction: Take a hypothetical loan rejection ("applicant rejected with PD = 12%"). Write three sentences a loan officer could tell the customer, using the top contributing features (income low, debt high, credit history short).

4

Fairness check: A model approves 65% of Group A and 50% of Group B. Is that fair? Write two short arguments: one that says it's expected (different risk profiles), one that says it's worth investigating (potential historical bias). Which would you investigate first, and why?

5

Model card draft: Sketch a one‑page model card for a hypothetical "expense categorizer." Include: purpose, training data, performance (with one weakness), limitations, owner. Make it short and readable.

6

Translate for CFO: Take a metric like "precision = 0.85 for fraud flags" and rewrite it as a single sentence that a CFO could understand in 5 seconds. Try three different translations and pick the clearest one.

🏆

By the end of this module, you'll be able to: pick the right metric for financial tasks, cross‑validate models safely, explain predictions with feature importance and partial dependence, audit for fairness, document models with a model card, and translate ML results for non‑technical audiences.

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→