01 / THE IDEA

Mortgage Affordability Prediction in practice.

Mortgage-affordability prediction estimates whether an applicant can afford a loan given income, liabilities, property and market features. Useful error modes include distribution shift across regions, missing income documentation, biased training labels and model overconfidence on rare applicant profiles.

Real-world use case · Proposed extension

A proposed application: screen loan enquiries to prioritise manual underwriting work. The automated score should be advisory only and every declined or high-value decision must be confirmed by a licensed human underwriter. This extension is not implemented in the supplied starter code.

02 / THE BUILD

How to build a mortgage affordability prediction project
step by step.

01

Define the target and thresholds

Decide whether affordability is framed as a regression (max affordable payment) or a classification (affordable / not affordable) and document economic thresholds and loss asymmetry.

02

Assemble representative data

Collect borrower income, liabilities, credit history, loan terms and local housing prices, and guard against label bias and privacy concerns before splitting.

03

Train a baseline with governance

Fit a reproducible baseline (eg. scaled tree ensemble) with cross-validation, record metrics that match decision costs, and log data versions.

04

Evaluate and human-review

Measure AUC, precision/recall at operational thresholds, calibration and disparate impact; route borderline predictions to human reviewers.

03 / SOURCE SNAPSHOT

What the mortgage affordability prediction starter actually does.

The supplied starter generates a synthetic binary classification dataset with sklearn.make_classification, wraps a StandardScaler and RandomForestClassifier in a Pipeline, fits on a random train/test split and prints a sklearn classification_report. It does not use mortgage features, real borrower records, or domain-specific preprocessing.

SOURCE EXCERPTPython
X, y = make_classification(
    n_samples=800,
    n_features=10,
    n_informative=6,
    n_redundant=2,
    random_state=RANDOM_STATE,
)

feature_names = [f"feature_{i}" for i in range(X.shape[1])]
data = pd.DataFrame(X, columns=feature_names)
data["target"] = y
Important limitation

The starter uses synthetic features from sklearn.make_classification rather than borrower, property or market data. Consequently its metrics do not validate mortgage-affordability performance, fairness or regulatory compliance. The small, simulated labelling does not exercise real-world covariate shift, missing-documentation cases or label-generation bias that are central to production mortgage models.

04 / BEYOND THE CLASSROOM

Where a mortgage affordability prediction project could go next.

PROPOSED BUSINESS CONCEPT

Mortgage affordability: a pilot concept

A proposed extension: replace the synthetic data with an anonymised, consented borrower dataset, add domain-specific feature engineering (DTI ratios, loan-to-value, regional price indices), and produce a calibrated score that routes uncertain cases to underwriters.

WHO IT COULD SERVEMortgage lenders and underwriting teams
FIRST MVPA reproducible pipeline that ingests anonymised borrower and property data, fits a calibrated classifier, reports operational metrics at chosen thresholds, and exposes predictions with an explanation panel for human reviewers.
KEY RISKFinancial decisions are sensitive: any automated affordability suggestion must be advisory and reviewed by a licensed underwriter. Model bias, label noise and distribution shift can cause unfair or unsafe outcomes; include human-in-the-loop review and regulatory oversight before deployment.

This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.

05 / WHAT YOU TAKE AWAY

What a mortgage affordability prediction project puts on your resume.

  • Translate a business affordability definition into a measurable ML target and operational thresholds.
  • Assemble and preprocess borrower and property features, and handle missing documentation and privacy requirements.
  • Fit and evaluate a reproducible baseline classifier with calibration and threshold-based operational metrics.
  • Define a review workflow that routes low-confidence or high-impact predictions to qualified human underwriters.
Want to build this with mentors and a lab?

Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.

AI Engineer Course
06 / QUESTIONS STUDENTS ASK

Mortgage Affordability Prediction project FAQs.

Is this suitable as a final year project?
Yes — it’s a practical applied project for final year students interested in finance and ML; use real borrower and property features to extend the starter and explore fairness and robustness.
What skills and tools do I need to complete it?
You should know Python, pandas and scikit-learn, plus basics of feature engineering, missing-data handling and model evaluation; domain reading on mortgage factors and fairness is recommended.
How should I evaluate or how long will it take?
Evaluate using realistic test sets, calibration, subgroup performance and robustness to distribution shifts; a thorough implementation and experiments typically take 6–12 weeks for a final year project.