public final class ClusterPredictor extends AbstractPredictor
| Constructor and Description |
|---|
ClusterPredictor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
execute(PMMLModel model,
RecordValued input,
ScalarSettable[] predictedFields)
Called to perform prediction.
|
RecordPort |
getOutput()
Returns a record port consisting of the input plus
the assigned cluster IDs.
|
String |
getWinnerFieldName()
Gets the name of the winner field in the output.
|
protected RecordTokenType |
predictedType(PMMLModelSpec modelSpec)
Given the model spec, returns the predicted type.
|
void |
setWinnerFieldName(String winnerFieldName)
Sets the name of the winner field in the output.
|
computeMetadata, execute, getInput, getModel, pushPrediction, stepNextcloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutputdisableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyErrorpublic String getWinnerFieldName()
public void setWinnerFieldName(String winnerFieldName)
winnerFieldName - the name of the winner field in the output.public RecordPort getOutput()
winnerFieldName.
The default name is "winner".getOutput in class AbstractPredictorprotected RecordTokenType predictedType(PMMLModelSpec modelSpec)
AbstractPredictorpredictedType in class AbstractPredictormodelSpec - the model metadataprotected void execute(PMMLModel model, RecordValued input, ScalarSettable[] predictedFields)
AbstractPredictorAbstractPredictor.stepNext(). For each row of input, subclasses should first set the predicted values in
the predictedFields array and then invoke AbstractPredictor.pushPrediction().
Subclasses should not invoke pushEndOfData since that is automatically handled by
the base class.execute in class AbstractPredictormodel - The input PMML modelinput - The input datapredictedFields - An array of fields that reference the predicted field locations. The
array positionally corresponds to the type returned by AbstractPredictor.predictedType(PMMLModelSpec).Copyright © 2020 Actian Corporation. All rights reserved.