Documentation of 'weka.core.pmml.Constant' Java class
Constant
weka.core.pmml

Class Constant

  • All Implemented Interfaces:
    java.io.Serializable


    public class Constant
    extends Expression
    Class encapsulating a Constant Expression.
    See Also:
    Serialized Form
    • Constructor Detail

      • Constant

        public Constant(org.w3c.dom.Element constant,
                        FieldMetaInfo.Optype opType,
                        java.util.ArrayList<Attribute> fieldDefs)
                 throws java.lang.Exception
        Construct an new Constant Expression.
        Parameters:
        constant - the xml Element containing the Constant
        opType - the optype for the Constant
        fieldDefs - an ArrayList of Attributes for the fields that this Expression might need to access (not needed for a constant!)
        Throws:
        java.lang.Exception - if the optype is specified as continuous and there is a problem parsing the value of the Constant
    • Method Detail

      • getResult

        public double getResult(double[] incoming)
        Get the result of evaluating the expression. In the case of a continuous optype, a real number is returned; in the case of a categorical/ordinal optype, the index of the nominal value is returned as a double.
        Specified by:
        getResult in class Expression
        Parameters:
        incoming - the incoming parameter values
        Returns:
        the result of evaluating the expression
      • getResultCategorical

        public java.lang.String getResultCategorical(double[] incoming)
                                              throws java.lang.Exception
        Gets the result of evaluating the expression when the optype is categorical or ordinal as the actual String value.
        Specified by:
        getResultCategorical in class Expression
        Parameters:
        incoming - the incoming parameter values
        Returns:
        the result of evaluating the expression
        Throws:
        java.lang.Exception - if the optype is continuous
      • main

        public static void main(java.lang.String[] args)
      • toString

        public java.lang.String toString(java.lang.String pad)
        Overrides:
        toString in class Expression

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.