Imputer Predict

更新时间:
复制 MD 格式

The Imputer Predict component uses trained models by Imputer Training component to generate batch predictions. The following imputation policies are supported: MEAN, MIN, MAX, and VALUE.

Limits

The supported compute engines are MaxCompute and Realtime Compute for Apache Flink.

Introduction

This Imputer Predict component uses trained models by Imputer Training component to generate batch predictions. You must specify a model trained by the Imputer Train component when you run the Imputer Predict component. The following imputation policies are supported: MEAN, MIN, MAX, and VALUE. You can specify a policy when you configure the Imputer Train component to generate models.

Configure the component in Machine Learning Designer

Input ports

Input port (from left to right)

Data type

Recommended upstream component

Required

Input model of the prediction

None

Imputer Train

Yes

Input data of the prediction

Integer

Read Table

Read CSV File

Yes

Component parameters

Tab

Parameter

Description

Parameter Setting

outputCols

The number of generated columns must be the same as the number of columns that you specify when you configure the Imputer Train component. If you do not specify this parameter, the generated columns replace the original columns.

numThreads

The number of threads used by the component. Default value: 1.

Execution Tuning

Number of Workers

The number of workers. This parameter must be used together with the Memory per worker, unit MB parameter. The value of this parameter must be a positive integer. Valid values: [1,9999].

Memory per worker, unit MB

The memory size of each worker. Valid values: 1024 to 65536. Unit: MB.

Output ports

Output port (from left to right)

Storage location

Recommended downstream component

Model type

Output result

N/A

None

None

Example

You can copy the following code to the code editor of the PyAlink Script component. This allows the PyAlink Script component to function like the Imputer Predict component.

from pyalink.alink import *

def main(sources, sinks, parameter):
    model = sources[0]
    data = sources[1]
    predictOp = ImputerPredictBatchOp()
    result = predictOp.linkFrom(model, data)
    result.link(sinks[0])
		BatchOperator.execute()