All Products
Search
Document Center

Platform For AI:Predict credit scores with a scorecard model

Last Updated:Aug 21, 2026

Build a scorecard model for credit scoring using PAI Designer financial components and credit card transaction data.

Background

A scorecard is a modeling framework for credit risk assessment and internet finance. Rather than a single algorithm, it applies feature engineering to binned data, then fits a linear model.

Applications include credit card risk assessment, loan disbursement, customer service scoring, and credit scoring systems such as Sesame Credit.

Prerequisites

Dataset

This pipeline uses a public dataset (Download dataset) with 30,000 records of user demographics (gender, education, marital status, age), transaction history, and billing statements.

The prediction target is the payment_next_month column, indicating whether a user repaid their credit card bill:

  • 1 indicates a repaid bill.

  • 0 indicates an outstanding bill.

Build and run the scorecard pipeline

  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 pipeline.

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

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

    3. In the Create Pipeline dialog box, configure the parameters. You can use the default settings for all parameters.

      The Data Storage parameter specifies an OSS Bucket path to store temporary data and models generated during the pipeline run.

    4. Click Confirm.

      It takes about 10 seconds to create the pipeline.

    5. On the Pipelines tab, double-click Credit Consumption Analysis Based on Scorecard to open the pipeline.

    6. The system builds the pipeline from the preset template.

      image.png

      Area

      Description

      Splits the dataset into training and prediction sets.

      The Binning component maps data to high-dimensional features by distribution interval, similar to one-hot encoding. After the pipeline completes, right-click Binning-1 and select Binning. In the configuration panel, click a feature name (for example, age) to view bin details.

      The binning details table shows 10 bins for a feature (from (-inf,25] to (49,+inf)), with the following information for each bin:

      • Label: Bin interval range

      • Constrain: Constraint conditions (Operator and Value), not set by default

      • WOE: WOE values for each bin (e.g., 0.250, -0.091, -0.114)

      • Number: Total, Positive, and Negative sample counts (e.g., row 0: Total=3138, Positive=845, Negative=2293)

      To view binning intervals per field, right-click Binning-1 and choose View Data > Binning Result Output.

      The feature binning summary table shows binning results for all 21 features (sex, education, marriage, limit_bal, age, pay_0pay_6, bill_amt1bill_amt6, pay_amt1pay_amt6), with each feature represented by a JSON segment containing the following key fields:

      • iv: Information Value (e.g., sex = 0.003556, limit_bal = 0.075548, pay_0 = 0.046904)

      • n: Sample count

      • p: Positive sample count

      • prate: Positive sample rate

      • total: Total sample count

      Compares sample stability before and after split/binning, returning the Population Stability Index (PSI) per feature. After the pipeline runs, right-click PSI-1 and choose View Data > Output to view details.PSI

      PSI quantifies distribution shift. Per-feature PSI is the sum across all bins: below 0.1 = insignificant change, 0.1–0.25 = moderate change, above 0.25 = significant change requiring review.

      Scorecard training. After the pipeline runs, right-click Scorecard Training-1 and choose View Data > Output Training Result Table to view results.

      The scorecard model output result table shows binning statistics for three features: intercept, pay_0 (bins include (-inf,-1], (-1,0], (0,1], (1,2], (2,+inf) totaling 8 rows), and limit_bal (bins from (-inf,30000] to (360000,+inf) totaling 11 rows). Columns include weight, scaled_weight, and contribution, as well as feaname, binid, bin, constraint, woe, total, positi, negativ, percentage_pos, percentage_neg, in_mode, test_woe, and test_contribution.

      A scorecard converts model weights into business-friendly scores. Key parameters:

      • weight: Original weight value.

      • Scaled_weight: Score change per bin. For example, for pay_0: values in (-1,0] reduce the score by 29; values in (0,1] increase it by 27.

      • contribution: Feature impact on the result. Larger values indicate greater impact.

      Predicts credit scores and evaluates model performance.

  3. Run the pipeline and view the results.

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

    2. After the pipeline finishes, right-click Scorecard Prediction-1 and choose View Data > Output to view credit scores.

      The output results contain the following fields:

      • payment_next_month: Next month payment behavior label (0 or 1)

      • prediction_score: Credit score (e.g., 685, 525)

      • prediction_prob: Prediction probability

      • prediction_detail: Detailed probability for each class (JSON format, containing probabilities for class 0 and class 1)

Related topics

Component references: