Class OutputField

    • Constructor Detail

      • OutputField

        public OutputField​(org.dmg.pmml.OutputField outputField)
      • OutputField

        public OutputField​(org.dmg.pmml.OutputField outputField,
                           int depth)
    • Method Detail

      • getOpType

        public org.dmg.pmml.OpType getOpType()
        Overrides:
        getOpType in class ModelField
        Returns:
        The operational type, or null.
      • getDataType

        public org.dmg.pmml.DataType getDataType()
        Overrides:
        getDataType in class ModelField
        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;
           }
         }
         
      • getField

        public org.dmg.pmml.OutputField getField()
        Overrides:
        getField in class ModelField
        Returns:
        The backing OutputField element.
      • 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.