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:
| Stage | Component(s) | What it does |
|---|---|---|
| ① Data import | — | Loads the dataset into the pipeline |
| ② Feature engineering | One Hot Encoding-1, SQL Script-1 | Converts string fields to numeric values. SQL Script-1 transforms the churn field: Yes → 1, No → 0 |
| ③ Model training | — | Splits the dataset into training and prediction sets for binary classification |
| ④ Model evaluation | Binary Classification Evaluation-1 | Scores 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:
| Field | Description |
|---|---|
customerid | User ID |
gender | User gender |
SeniorCitizen | Whether the user is a citizen. Valid values: 1 (citizen), 0 (not a citizen) |
Partner | Whether the user has a partner |
Dependents | Whether the user is affiliated |
tenure | Duration of service with the provider |
PhoneService | Whether the user subscribes to mobile phone services |
MultipleLine | Whether the user uses multiple lines of services |
InternetService | Internet service type (e.g., DSL or Fiber optic) |
OnlineSecurity | Whether the user faces Internet security issues |
OnlineBackup | Whether the user has access to online support |
DeviceProtection | Whether the user has access to service protection |
TechSupport | Whether the user has applied for technical support |
StreamingTV | Whether the user has access to streaming TV programs |
StreamingMovies | Whether the user has access to streaming movies |
Contract | Contract period (e.g., Month-to-month or Two year) |
PaperlessBilling | Whether the user receives electronic bills |
PaymentMethod | Payment method |
MonthlyCharges | Monthly expenses |
TotalCharges | Total expenses to date |
Churn label:
| Field | Description |
|---|---|
churn | Whether the user has churned |
Build and run the pipeline
Step 1: Open Machine Learning Designer
Log on to the PAI console.
In the left-side navigation pane, click Workspaces, then click the name of the workspace you want to use.
In the left-side navigation pane, choose Model Training > Visualized Modeling (Designer).
Step 2: Create the pipeline from a template
On the Visualized Modeling (Designer) page, click the Preset Templates tab.
Find the Churn User Monitoring template and click Create.
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.
Click OK. The pipeline takes about 10 seconds to create.
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.

Step 3: Run the pipeline and review results
Click the Run icon in the upper-left corner of the canvas.
After the pipeline finishes, right-click the Binary Classification Evaluation-1 component and select Visual Analysis.
In the Evaluate section, click the Index data tab to view the evaluation metrics.
Metric What it measures What to look for AUC (area under curve) Overall prediction accuracy Values above 0.8 indicate a well-performing model; the closer to 1, the better KS value Separation between churn and non-churn predictions Higher values indicate stronger model discrimination F1 score Balance between precision and recall Higher values indicate fewer false positives and false negatives 
Sample data
The following figure shows what the dataset looks like:

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};