Scorecard Prediction

更新时间:
复制 MD 格式

Scorecard Prediction is a machine learning technique that applies a scorecard model to new data to predict future performance or risk. This model is typically generated by a scorecard training component. The Scorecard Prediction component uses this model to evaluate and score input data, which aids in decision-making and risk management.

Configure the component

Method 1: Use the UI

In Designer, add the Scorecard Prediction component to your pipeline and configure its parameters in the right-side pane.

Tab

Parameter

Description

Field Settings

Feature Columns

Select the raw feature columns to use for prediction. By default, all columns are selected.

Reserved Columns

Select columns to append to the prediction result table without processing, such as ID columns and label columns.

Output Variable Score

Specifies whether to output the score for each feature variable. The final prediction score is the sum of the score for the intercept term and all variable scores.

Tuning

Number of cores

The number of CPU cores to use. By default, the system assigns a value automatically.

Memory per core

The memory allocated to each CPU core. By default, the system assigns a value automatically.

Method 2: Use a PAI command

Configure the Scorecard Prediction component parameters using a PAI command. You can run PAI commands in the SQL Script component. For more information, see SQL Script.

pai -name=lm_predict
    -project=algo_public
    -DinputFeatureTableName=input_data_table
    -DinputModelTableName=input_model_table
    -DmetaColNames=sample_key,label
    -DfeatureColNames=fea1,fea2
    -DoutputTableName=output_score_table

Parameter

Required

Default

Description

inputFeatureTableName

Yes

None

The input feature table.

inputFeatureTablePartitions

No

The entire table

The partitions to use from the input feature table.

inputModelTableName

Yes

None

The input model table.

featureColNames

No

All columns

The feature columns to use from the input table.

metaColNames

No

None

The columns that are passed through to the output table without being processed, such as a label and sample_id.

outputFeatureScore

No

false

Specifies whether to output variable scores in the prediction results. Valid values:

  • true: Outputs the variable scores.

  • false: Does not output the variable scores.

outputTableName

Yes

None

The output table for the prediction results.

lifecycle

No

None

The lifecycle of the output table.

coreNum

No

Automatically determined

The number of cores.

memSizePerCore

No

Automatically determined

The memory size per core, in MB.

Outputs

The following is a sample output from the Scorecard Prediction component. After scoring, the output table contains the original label column, such as churn (with a value of 0 or 1), and prediction columns. The churn column is a reserved column that is passed through to the output and is not part of the prediction results. The following table describes the prediction columns.

Name

Type

Description

prediction_score

DOUBLE

The predicted score. For a linear model, this is the sum of each feature value multiplied by its corresponding model weight. In a scorecard model, if score transformation is performed, this column contains the transformed score.

prediction_prob

DOUBLE

For binary classification, this is the predicted probability of the positive class. This value is calculated by applying a Sigmoid transformation to the original score, before any score transformation occurs.

prediction_detail

STRING

A JSON string that contains the predicted probability for each class. In the string, 0 represents the negative class and 1 represents the positive class. Example: {"0":0.1813110520,"1":0.8186889480}.