◷ Reading Time: 5 minutes
This sample determines the interest rate of an application using the applicant’s personal and account data. We will also be using a built-in, machine-learning algorithm to predict the payment delays and determine the final interest rate based on the predicted delays.
Running the Sample
1. Open Main.xml in FlexRule Designer.
2. Click on Logic Run Template.
3. Select a template from the list
4. Click on Debug.
5. Click on Next Step continuously, until the project is executed successfully. You will be able to see the project run, step-by-step.
6. After the project executes successfully, the Parameters Window will display the recommendation
The main model is the high-level model that connects different components of the project. It connects the validation, input, and decision-making components of the complete solution sequentially.
- Validate Applicant Input: The first step validates the user id, by retrieving the applicant’s input data.
- Retrieve Personal and Account Data: Based on the user ID inputted, the user’s personal and account data are retrieved.
- Determine Interest Rate: Using a built-in machine learning algorithm, the interest rate is determined.
The decision graph automatically resolves the dependencies between logic implementations. That means this Decision Requirement Diagram knows that to determine repayment risk score, and interest rate, it requires predicting repayment delay. Therefore, it goes through each node according to its decision hierarchy.
We will be using a dataset of previous customers to predict the delay of a given applicant. We use the C45 algorithm which is a built-in algorithm in Analytics Extension to create the predictive model.
The model predicts whether a customer will delay payments and by how many months, by using previous customer data as well as the borrowing amount.
This is a snippet of the dataset used. We have only used the following attributes from the original dataset.
Decision tables were used to define the business rules.
Attributes of the applicant are modeled as a Fact Concept. You can also define the validation rules such as User ID cannot be null or empty.
We will define the business terms in a business glossary in order to make the concepts easy to understand and we map our fact concept in a way that is easily human-readable.
Define the expressions we use in the project which can later be easily reused across multiple documents.
Download the project
Use the attachment at the end of the page to download the sample project.