Class TargetMetaInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class TargetMetaInfo
    extends FieldMetaInfo
    implements java.io.Serializable
    Class to encapsulate information about a Target.
    Version:
    $Revision 1.0 $
    Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
    See Also:
    Serialized Form
    • Method Detail

      • getPriorProbability

        public double getPriorProbability​(java.lang.String value)
                                   throws java.lang.Exception
        Get the prior probability for the supplied value.
        Parameters:
        value - the value to get the probability for
        Returns:
        the probability
        Throws:
        java.lang.Exception - if there are no TargetValues defined or if the supplied value is not in the list of TargetValues
      • getDefaultValue

        public double getDefaultValue()
                               throws java.lang.Exception
        Get the default value (numeric target)
        Returns:
        the default value
        Throws:
        java.lang.Exception - if there is no TargetValue defined
      • getValues

        public java.util.ArrayList<java.lang.String> getValues()
        Get the values (discrete case only) for this Target. Note: the list may be empty if the pmml doesn't specify any values.
        Returns:
        the values of this Target
      • applyMinMaxRescaleCast

        public double applyMinMaxRescaleCast​(double prediction)
                                      throws java.lang.Exception
        Apply min and max, rescaleFactor, rescaleConstant and castInteger - in that order (where defined).
        Parameters:
        prediction - the prediction to apply these modification to
        Returns:
        the modified prediction
        Throws:
        java.lang.Exception - if this target is not a continuous one