Package org.jpmml.evaluator
Class OutputField
- java.lang.Object
-
- org.jpmml.evaluator.ModelField
-
- org.jpmml.evaluator.ResultField
-
- org.jpmml.evaluator.OutputField
-
- All Implemented Interfaces:
java.io.Serializable
public class OutputField extends ResultField
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OutputField(org.dmg.pmml.OutputField outputField)OutputField(org.dmg.pmml.OutputField outputField, int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.dmg.pmml.DataTypegetDataType()intgetDepth()Returns the nesting depth relative to the "host" model evaluator.org.dmg.pmml.OutputFieldgetField()org.dmg.pmml.OpTypegetOpType()booleanisFinalResult()Returns the "finality" (as decided by the PMML producer) of this output field.protected org.jpmml.model.ToStringHelpertoStringHelper()-
Methods inherited from class org.jpmml.evaluator.ModelField
getDisplayName, getFieldName, getName, toString
-
-
-
-
Method Detail
-
getOpType
public org.dmg.pmml.OpType getOpType()
- Overrides:
getOpTypein classModelField- Returns:
- The operational type, or
null.
-
getDataType
public org.dmg.pmml.DataType getDataType()
- Overrides:
getDataTypein classModelField- Returns:
- The data type, or
null.
-
isFinalResult
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; } }
-
toStringHelper
protected org.jpmml.model.ToStringHelper toStringHelper()
- Overrides:
toStringHelperin classModelField
-
getField
public org.dmg.pmml.OutputField getField()
- Overrides:
getFieldin classModelField- Returns:
- The backing
OutputFieldelement.
-
getDepth
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 } }- Returns:
- The nesting depth.
-
-