All Products
Search
Document Center

Platform For AI:XGBoost Predict

Last Updated:Sep 10, 2026

Runs offline inference on models from the XGBoost Train component. Supports classification and regression with Table or LibSVM input.

Limits

Supported computing engines: MaxCompute, Flink, and DLC.

Data formats

Supported formats: Table and LibSVM.

  • Table format example:

    f0

    f1

    label

    0.1

    1

    0

    0.9

    2

    1

  • LibSVM format example:

    Sample data

    2:1 9:1 10:1 20:1 29:1 33:1 35:1 39:1 40:1 52:1 57:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 101:1 104:1 116:1 123:1

    0:1 9:1 18:1 20:1 23:1 33:1 35:1 38:1 41:1 52:1 55:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 101:1 105:1 115:1 121:1

    2:1 8:1 18:1 20:1 29:1 33:1 35:1 39:1 41:1 52:1 57:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 101:1 104:1 116:1 123:1

    2:1 9:1 13:1 21:1 28:1 33:1 36:1 38:1 40:1 53:1 57:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 97:1 105:1 113:1 119:1

    0:1 9:1 18:1 20:1 22:1 33:1 35:1 38:1 44:1 52:1 55:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 101:1 104:1 115:1 121:1

    0:1 8:1 18:1 20:1 23:1 33:1 35:1 38:1 41:1 52:1 55:1 64:1 68:1 76:1 85:1 87:1 91:1 94:1 101:1 105:1 116:1 121:1

GUI configuration

Configure the XGBoost Predict component on the Designer canvas.

Parameter

Type

Description

Fields Setting

Reserved Column Name

String array

Columns to preserve in output.

Feature Columns

String array

Feature columns for Table format data. Mutually exclusive with Vector Field (LibSVM format).

Vector Field Name

String

Column containing LibSVM format data. Mutually exclusive with Feature Columns (Table format).

Parameters Setting

Prediction Result Column

String

Name of output column for prediction results.

Execution Tuning

Number of Workers

Positive integer

Number of parallel workers. Set together with Memory per Worker. Valid values: [1, 9999].

Memory per Worker

Positive integer

Memory allocated per worker in MB. Valid values: [1024, 64 × 1024].

Usage example

This example demonstrates XGBoost classification on Higgs boson event data using a preset template. To create this pipeline from the Use XGBoost algorithm to identify the Higgs boson template, see Create a pipeline from a preset template.

Convert the output format for evaluation

The component outputs JSON strings serialized from the open-source XGBoost library. Convert this output to enable evaluation components to process predictions.

Add an SQL Script component downstream of XGboost Predict. The SQL Script converts predictions into the format required by Binary classification Evaluation V2. Use this code:

set odps.sql.udf.getjsonobj.new=true;

select *, CONCAT("{\"0\":", 1.0-prob, ",\"1\":", prob, "}") as detail
FROM (
select *, cast(get_json_object(pred, '$[0]') as double) as prob FROM ${t1})

References

  • XGBoost Predict requires a trained model from the XGBoost Train component. For configuration details, see XGBoost Train.

  • Designer provides algorithm components for data processing tasks. For a complete list, see Overview of Designer components.