public final class DecisionTreePredictor extends AbstractPredictor
| Constructor and Description |
|---|
DecisionTreePredictor()
Creates a decision tree predictor with default settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
execute(PMMLModel pmml,
RecordValued input,
ScalarSettable[] predictedFields)
Called to perform prediction.
|
String |
getConfidencePrefix()
Gets the field name prefix to use for confidence.
|
RecordPort |
getOutput()
Returns a record port consisting of the original input plus predicted values.
|
String |
getRecordCountPrefix()
Gets the field name prefix to use for record counts.
|
String |
getWinnerField()
Gets the name of the winner field to output.
|
boolean |
isAppendConfidence()
Returns whether to append confidence information.
|
boolean |
isAppendRecordCount()
Returns whether to append record count information.
|
protected RecordTokenType |
predictedType(PMMLModelSpec modelSpec)
Given the model spec, returns the predicted type.
|
void |
setAppendConfidence(boolean appendConfidence)
Sets whether to append confidence information.
|
void |
setAppendRecordCount(boolean appendRecordCount)
Sets whether to append record count information.
|
void |
setConfidencePrefix(String confidencePrefix)
Sets the field name prefix to use for confidence.
|
void |
setRecordCountPrefix(String recordCountPrefix)
Sets the field name prefix to use for record counts.
|
void |
setWinnerField(String winnerField)
Sets the name of the winner field to output.
|
computeMetadata, execute, getInput, getModel, pushPrediction, stepNextcloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutputdisableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyErrorpublic DecisionTreePredictor()
public RecordPort getOutput()
winnerField. recordCountPrefix.
confidencePrefix.getOutput in class AbstractPredictorpublic boolean isAppendRecordCount()
public void setAppendRecordCount(boolean appendRecordCount)
appendRecordCount - whether to append record count information.public String getWinnerField()
public void setWinnerField(String winnerField)
winnerField - the name of the winner field to output.public String getRecordCountPrefix()
public void setRecordCountPrefix(String recordCountPrefix)
recordCountPrefix - the field name prefix to use for record counts.public String getConfidencePrefix()
public void setConfidencePrefix(String confidencePrefix)
confidencePrefix - the field name prefix to use for confidence.public boolean isAppendConfidence()
public void setAppendConfidence(boolean appendConfidence)
appendConfidence - whether to append confidence information.protected RecordTokenType predictedType(PMMLModelSpec modelSpec)
AbstractPredictorpredictedType in class AbstractPredictormodelSpec - the model metadataprotected void execute(PMMLModel pmml, 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 AbstractPredictorpmml - 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 © 2021 Actian Corporation. All rights reserved.