Standard scaler batch predict
Updated at:
Standard scaler batch predict applies standardization to batch data using a model trained by the Standard scaler train component. The algorithm uses the mean and variance to standardize the data, mapping values from different columns to a common range. This improves the stability and accuracy of downstream model predictions — particularly for large datasets where column ranges vary significantly.
This component assumes the input data follows a normal distribution.
Limits
Supported computing engines: MaxCompute and Flink.
Configure the component
Input ports
| Input port (left to right) | Accepted data types | Recommended upstream component | Required |
|---|---|---|---|
| Input model for prediction | None | Standard scaler train | Yes |
| Input data for prediction | Numeric | Read table, Read CSV file | Yes |
Parameters
| Tab | Parameter | Description |
|---|---|---|
| Parameters | Output column names | Optional. By default, the prediction result columns replace the original input columns. The number of output columns must match the number of columns selected during training. Separate multiple column names with commas (,). |
| Number of threads | The default value is 1. | |
| Execution tuning | Number of Workers | Use with the Memory per worker parameter. Must be an integer from 1 to 9,999. |
| Memory per worker (MB) | Must be from 1,024 MB to 65,536 MB. |
Output ports
| Output port (left to right) | Storage location | Recommended downstream component | Model type |
|---|---|---|---|
| Output result | No configuration required. | None | None |
Example
The following PyAlink Script code performs the same operation as this component. sources[0] is the trained model and sources[1] is the batch data to transform.
from pyalink.alink import *
def main(sources, sinks, parameter):
model = sources[0]
batchData = sources[1]
predictor = StandardScalerPredictBatchOp()
result = predictor.linkFrom(model, batchData)
result.link(sinks[0])
BatchOperator.execute()
Is this page helpful?