All Products
Search
Document Center

Platform For AI:Predict and manage user churn

Last Updated:Apr 01, 2026

Use PAI's Machine Learning Designer to build a binary classification model that predicts which users are likely to churn — no code required.

Prerequisites

Before you begin, make sure you have:

  • Basic knowledge of machine learning concepts (classification models, feature engineering, model evaluation)

  • More than 1,000 labeled data records that capture user churn behavior

  • One to two days available for development

How it works

The Churn User Monitoring pipeline in PAI Designer runs four stages automatically:

StageComponent(s)What it does
① Data importLoads the dataset into the pipeline
② Feature engineeringOne Hot Encoding-1, SQL Script-1Converts string fields to numeric values. SQL Script-1 transforms the churn field: Yes1, No0
③ Model trainingSplits the dataset into training and prediction sets for binary classification
④ Model evaluationBinary Classification Evaluation-1Scores the model using AUC, Kolmogorov-Smirnov (KS) value, and F1 score

Dataset

The pipeline uses masked real data from a telecommunications platform — 7,043 records in total, each containing user profile information and a churn label.

User profile fields:

FieldDescription
customeridUser ID
genderUser gender
SeniorCitizenWhether the user is a citizen. Valid values: 1 (citizen), 0 (not a citizen)
PartnerWhether the user has a partner
DependentsWhether the user is affiliated
tenureDuration of service with the provider
PhoneServiceWhether the user subscribes to mobile phone services
MultipleLineWhether the user uses multiple lines of services
InternetServiceInternet service type (e.g., DSL or Fiber optic)
OnlineSecurityWhether the user faces Internet security issues
OnlineBackupWhether the user has access to online support
DeviceProtectionWhether the user has access to service protection
TechSupportWhether the user has applied for technical support
StreamingTVWhether the user has access to streaming TV programs
StreamingMoviesWhether the user has access to streaming movies
ContractContract period (e.g., Month-to-month or Two year)
PaperlessBillingWhether the user receives electronic bills
PaymentMethodPayment method
MonthlyChargesMonthly expenses
TotalChargesTotal expenses to date

Churn label:

FieldDescription
churnWhether the user has churned

Build and run the pipeline

Step 1: Open Machine Learning Designer

  1. Log on to the PAI console.

  2. In the left-side navigation pane, click Workspaces, then click the name of the workspace you want to use.

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

Step 2: Create the pipeline from a template

  1. On the Visualized Modeling (Designer) page, click the Preset Templates tab.

  2. Find the Churn User Monitoring template and click Create.

  3. In the Create Pipeline dialog box, review the parameters. The Data Storage parameter sets the Object Storage Service (OSS) bucket path where the pipeline stores temporary data and models during runtime. The default values work for most cases.

  4. Click OK. The pipeline takes about 10 seconds to create.

  5. On the Pipelines tab, double-click the Churn User Monitoring pipeline to open it. The canvas shows all four pipeline stages, pre-configured and ready to run.

    Churn user monitoring

Step 3: Run the pipeline and review results

  1. Click the Run icon in the upper-left corner of the canvas.

  2. After the pipeline finishes, right-click the Binary Classification Evaluation-1 component and select Visual Analysis.

  3. In the Evaluate section, click the Index data tab to view the evaluation metrics.

    MetricWhat it measuresWhat to look for
    AUC (area under curve)Overall prediction accuracyValues above 0.8 indicate a well-performing model; the closer to 1, the better
    KS valueSeparation between churn and non-churn predictionsHigher values indicate stronger model discrimination
    F1 scoreBalance between precision and recallHigher values indicate fewer false positives and false negatives

    Model effects

Sample data

The following figure shows what the dataset looks like:

Dataset for the pipeline on monitoring user churn

The SQL Script-1 component runs the following statement to encode the churn label:

select (case churn  when 'Yes' then 1 else 0 end) as churn from  ${t1};