public class OutputField extends ResultField
| Constructor and Description |
|---|
OutputField(org.dmg.pmml.OutputField outputField) |
OutputField(org.dmg.pmml.OutputField outputField,
int depth) |
| Modifier and Type | Method and Description |
|---|---|
org.dmg.pmml.DataType |
getDataType() |
int |
getDepth()
Returns the nesting depth relative to the "host" model evaluator.
|
org.dmg.pmml.OutputField |
getField() |
org.dmg.pmml.OpType |
getOpType() |
boolean |
isFinalResult()
Returns the "finality" (as decided by the PMML producer) of this output field.
|
protected org.jpmml.model.ToStringHelper |
toStringHelper() |
getDisplayName, getFieldName, getName, toStringpublic OutputField(org.dmg.pmml.OutputField outputField)
public OutputField(org.dmg.pmml.OutputField outputField,
int depth)
public org.dmg.pmml.DataType getDataType()
getDataType in class ModelFieldnull.public org.dmg.pmml.OpType getOpType()
getOpType in class ModelFieldnull.public boolean isFinalResult()
Returns the "finality" (as decided by the PMML producer) of this output field. Final values are suitable for displaying to the end user. Non-final values correspond to intermediate states of the prediction (eg. value transformations, value transfers between models) and are not suitable for displaying to the end user.
Typically, final values are always available in the result data record, whereas non-final values may or may not be available depending on the "evaluation path" of a particular argument data record.
Filtering output fields based on their "finality":
List<OutputField> outputFields = evaluator.getOutputFields();
for(OutputField outputField : outputFields){
boolean finalResult = outputField.isFinalResult();
if(!finalResult){
continue;
}
}
protected org.jpmml.model.ToStringHelper toStringHelper()
toStringHelper in class ModelFieldpublic org.dmg.pmml.OutputField getField()
getField in class ModelFieldOutputField element.public int getDepth()
Returns the nesting depth relative to the "host" model evaluator.
Filtering output fields based on their origin:
List<OutputField> outputFields = evaluator.getOutputFields();
for(OutputField outputField : outputFields){
int depth = outputField.getDepth();
if(depth == 0){
// Defined by the top-level model
} else
if(depth > 0){
// Defined by one of the nested models
}
}
Copyright © 2019. All rights reserved.