程序包 weka.core.pmml

类 Constant

所有已实现的接口:
Serializable

public class Constant extends Expression
Class encapsulating a Constant Expression.
版本:
$Revision 1.0 $
作者:
Mark Hall (mhall{[at]}pentaho{[dot]}com
另请参阅:
  • 构造器详细资料

    • Constant

      public Constant(Element constant, FieldMetaInfo.Optype opType, ArrayList<Attribute> fieldDefs) throws Exception
      Construct an new Constant Expression.
      参数:
      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!)
      抛出:
      Exception - if the optype is specified as continuous and there is a problem parsing the value of the Constant
  • 方法详细资料

    • 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.
      指定者:
      getResult 在类中 Expression
      参数:
      incoming - the incoming parameter values
      返回:
      the result of evaluating the expression
    • getResultCategorical

      public String getResultCategorical(double[] incoming) throws Exception
      Gets the result of evaluating the expression when the optype is categorical or ordinal as the actual String value.
      指定者:
      getResultCategorical 在类中 Expression
      参数:
      incoming - the incoming parameter values
      返回:
      the result of evaluating the expression
      抛出:
      Exception - if the optype is continuous
    • main

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

      public String toString(String pad)
      覆盖:
      toString 在类中 Expression