All Products
Search
Document Center

Platform For AI:Credit scoring with a scorecard

Last Updated:Mar 06, 2026

Build a scorecard model for credit risk assessment using PAI financial components and credit card transaction data.

Background information

A scorecard is a common modeling method in credit risk assessment and Internet finance. It is not a specific machine learning algorithm but a general modeling framework that applies feature engineering transformations to binned raw data and then uses a linear model for modeling.

Scorecard modeling is typically used for credit assessment, such as credit card risk assessment and loan issuance services. In other fields, scorecard modeling can also evaluate scores for customer service quality and Zhima Credit.

Prerequisites

Dataset

This workflow uses an open source dataset from an external institution (Download dataset) containing 30,000 records. The dataset includes gender, education, marital status, age, credit card transaction history, and credit card bill details of users.

The payment_next_month column is the target column that indicates whether a user repays the credit card bill.

  • 1 indicates that the bill is repaid.

  • 0 indicates that the bill is not repaid.

Credit scoring with a scorecard

  1. Go to the Machine Learning Designer page.

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

    3. In the left-side navigation pane, choose Model Training > Visualized Modeling (Designer).

  2. Build the workflow.

    1. On the Designer page, click the Preset Template tab.

    2. On the Preset Templates page, under Credit Card Consumption Analysis Based on Scorecard, click Create.

    3. In the New Workflow dialog box, configure the parameters. You can use the default values.

      The Workflow Data Storage is set to an OSS bucket path to store temporary data and models generated when the workflow is running.

    4. Click OK.

      The workflow is created in about 10 seconds.

    5. Double-click Credit Card Consumption Analysis Based on Scorecard in the workflow list to open it.

    6. The system automatically builds a workflow based on the preset template as shown in the following figure.

      image.png

      Area

      Description

      Splits the input dataset into training and test datasets.

      The Binning component is similar to One-Hot encoding and maps data to high-dimensional features based on data distribution. For example, for the age field, the Binning component performs binning operations based on data distribution in different intervals. After the workflow runs, right-click the Binning-1 component and select Binning. In the Binning-1 configuration pane, click the name (age) to view details. The result is shown in the following figure.image.pngAfter the workflow runs, right-click the Binning-1 component and choose View Data > Binning Result Output from the shortcut menu. Each field is binned into multiple intervals as shown in the following figure.分箱结果

      Comprehensively compares sample stability before and after splitting and after binning, and returns the population stability index (PSI) value for each feature. After the workflow runs, right-click the Population Stability Index (PSI)-1 component and choose View Data > Outputs to view results. The result is shown in the following figure.PSI

      The population stability index (PSI) is an important metric that measures the shift in sample distribution over time and indicates sample stability. The total PSI value for a feature is the sum of PSI values for each row of that feature. Typically, a PSI value less than 0.1 indicates that sample change is not significant. A PSI value between 0.1 and 0.25 indicates significant sample change. A PSI value greater than 0.25 indicates drastic sample change requiring special attention.

      Scorecard training. After the workflow runs, right-click the Scorecard Training-1 component and choose View Data > Training Result Output Table to view training results. The result is shown in the following figure.评分卡结果The essence of a scorecard is to use scores that meet business standards to represent complex model weights. Key parameters of the result are as follows:

      • weight: The original weight value.

      • Scaled_weight: The score change indicator. For example, for the pay_0 feature, if the feature value is in the (-1,0] interval, the score decreases by 29. If the feature value is in the (0,1] interval, the score increases by 27.

      • contribution: The impact of each feature on the result. A larger value indicates a greater impact.

      Predicts credit score for each user and evaluates model performance.

  3. Run the workflow and view the output results.

    1. Click the run button image.png at the top of the canvas.

    2. After the workflow run completes, right-click the Scorecard Prediction-1 component on the canvas and select View Data > Outputs from the shortcut menu to view the credit score of each user.信用评分

References

For more information about the algorithm components, see: