Introduction
Welcome to the first lesson of your course on designing a real-world data science project. As we discussed, the goal is to go beyond just building a model and focus on the end-to-end professional workflow, using loan default prediction as our case study.
This first lesson is all about laying a solid foundation. Before writing a single line of code, a successful project must be properly framed. By the end of this lesson, you will be able to frame the loan default problem by defining its business objectives, identifying the key stakeholders involved, and translating the business problem into a formal supervised classification task. This initial scoping phase, often part of the "Business Understanding" stage in frameworks like CRISP-DM, is critical for ensuring that the final model provides real business value.
Defining the Business Problem and Objectives
First, let's establish why a financial institution would invest in predicting loan defaults. It's not just about predicting an outcome; it's about managing a fundamental business risk.
To see this in a real-world context, please watch the following segment from a talk by a data scientist at Zopa, a peer-to-peer lending company. Pay close attention to the three main reasons they give for needing to assess and manage credit risk.
Machine Learning in Financial Credit Risk Assessment - Data Science Festival
This video from the Data Science Festival provides insight into how a real FinTech company, Zopa, thinks about credit risk.
Watch the section from 01:03 to 04:19. The speaker explains Zopa's business model and the core business drivers for managing credit risk.
As you saw, the objectives go beyond simple profit and loss. They include:
- Lending responsibly: Avoiding putting borrowers in a financially difficult situation.
- Protecting investors: Ensuring that the people lending money are confident they will be repaid.
- Maintaining reputation: Being seen as a credible and responsible lender in the market.
These business objectives are often formalized within a regulatory framework. Financial institutions must calculate and provision for potential losses.
To understand this formal context, please read the "Business problem" section of the following document from DataRobot.
Predict the likelihood of a loan default
This document outlines the business problem of loan default prediction, introducing key industry terminology.
Read the section titled 'Business problem'. Focus on the concepts of Expected Credit Loss (ECL), Probability of Default (PD), Loss Given Default (LGD), and Exposure at Default (EAD).
The key takeaway is the formula for Expected Credit Loss:
Our project will focus on modeling the Probability of Default (PD), which is the component that machine learning is best suited to predict. By building an accurate PD model, we directly address the business objective of minimizing Expected Credit Loss.
Identifying and Understanding Stakeholders
Now that we know why we're building this model, the next question is who it's for. A model is only useful if it's understood, trusted, and used by the right people. This requires a stakeholder analysis.
The following short video provides an excellent, general-purpose framework for identifying, prioritizing, and understanding stakeholders in any project.
What is a Stakeholder Analysis? — Leading Successful Projects
This video from ProductPlan explains the three key steps of performing a stakeholder analysis, a crucial practice for project management.
Watch the clip from 00:58 to 03:38. Focus on the three steps: identifying, prioritizing (using the power/interest grid), and understanding stakeholders.
Now, let's apply this thinking to our loan default scenario. Who are the specific stakeholders in a credit risk project? The DataRobot document you viewed earlier provides a clear list.
Predict the likelihood of a loan default
Let's return to the DataRobot document to identify the specific roles involved in a loan default project.
Read the section 'Decision stakeholders'. It provides a table listing the key people involved and their roles.
Combining the framework from the video with the roles from the document, we can profile our key stakeholders:
- Decision Executors (Underwriting Team): These are high-interest stakeholders. They will use the model's output daily to make decisions on loan applications. Their primary motivation is efficiency and confidence in their decisions. They need the model's output to be clear and easily interpretable.
- Decision Managers (Chief Risk Officer, Portfolio Managers): These are high-power, high-interest stakeholders. They are responsible for the overall financial health and risk exposure of the loan portfolio. They are motivated by regulatory compliance, portfolio performance, and strategic risk management. They need to trust the model's validity and understand its impact on the business's bottom line.
- Decision Authors (Data Scientists, Model Risk Monitoring Team): This is your team. You are high-interest and have influence over the project's technical direction. Your motivation is to build an accurate, robust, and fair model. You must also ensure the model is well-documented and can pass audits from managers and regulators.
By understanding these different perspectives, you can design a project that meets everyone's needs, which is essential for successful adoption.
Translating to a Supervised Classification Task
The final and most crucial step in project framing is translating the business problem into a well-defined machine learning problem. This involves moving from vague business goals to precise technical specifications.
A systematic approach is essential here. Industry frameworks like the Cross-Industry Standard Process for Data Mining (CRISP-DM) provide a roadmap. The work we've done so far falls squarely into its first phase: Business Understanding.
The following resource provides a structured set of questions that a data scientist should ask to bridge the gap between business needs and model design.
Credit Scoring Series Part Two: Credit Scorecard Modeling Methodology
This article from Altair discusses a systematic methodology for credit scorecard modeling, highlighting the key questions to ask during the framing stage.
First, read the section starting with 'Question 1...' and ending just before 'Development Methodologies'. Note the key questions about defining 'good'/'bad' customers and the outcome period. Then, read the section 'Theoretical Framework and Model Design' to understand how to formalize these definitions.
As the article highlights, we must define several key components to create a "model design":
- The Business Problem: Minimize credit loss by identifying applicants likely to default.
- The ML Problem Type: We can frame this as a binary supervised classification task.
- The Unit of Analysis: The model will make a prediction for each loan application.
- The Target Variable (Operational Definition): This is the most critical definition. What, precisely, constitutes a "default"? This is a business decision. A common industry standard is to define a default as a loan that is 90 or more days past due.
- Our target variable,
is_badordefault_status, will be1if the customer defaults (e.g., reaches 90 days past due) and0otherwise.
- Our target variable,
- The Performance Window: Over what period after the loan is issued will we check for this default condition? This could be 12 months, 24 months, or the life of the loan.
Let's see a practical example of how Zopa defined their target variable.
Machine Learning in Financial Credit Risk Assessment - Data Science Festival
Returning to the Zopa talk, the speaker explains exactly how they translate financial difficulty into a binary target for their model.
Watch the section from 07:28 to 09:27. Focus on how they look for 'signs of financial difficulty' and assign a 0 or a 1 to create a binary target.
This translation is the cornerstone of the entire project. Having a clear, unambiguous definition of the target variable, agreed upon with business stakeholders, ensures that you are building a model that solves the right problem.
Conclusion
In this lesson, we established the critical foundation for our loan default prediction project. You have learned how to move from a high-level business need to a concrete, machine-learning problem statement.
Key Takeaways:
- Business Objectives: The primary goal is to manage credit risk, driven by the need to lend responsibly, protect capital, and maintain a strong market reputation. This is formalized by the need to estimate and minimize Expected Credit Loss (ECL).
- Stakeholder Framing: A successful project must meet the needs of diverse stakeholders, including underwriters (executors), risk officers (managers), and the data science team (authors).
- Problem Translation: We translate the business problem into a binary supervised classification task by:
- Identifying the unit of analysis (a loan).
- Creating a precise operational definition for the target variable (e.g., a loan is in "default" if it is 90+ days past due).
- Establishing a performance window to observe the outcome.
Next Steps:
Now that we have defined what we want to predict, the next logical step is to determine how we will measure success. In the next lesson, we will establish an evaluation framework, selecting metrics that are sensitive to the business costs of misclassification in a loan default scenario.