程序包 weka.core.pmml

类 Function

java.lang.Object
weka.core.pmml.Function
所有已实现的接口:
Serializable
直接已知子类:
BuiltInArithmetic, BuiltInMath, BuiltInString, DefineFunction

public abstract class Function extends Object implements Serializable
Abstract superclass for PMML built-in and DefineFunctions.
版本:
$Revision 1.0 $
作者:
Mark Hall (mhall{[at]}pentaho{[dot]}com)
另请参阅:
  • 构造器详细资料

    • Function

      public Function()
  • 方法详细资料

    • getName

      public String getName()
    • getParameterNames

      public abstract String[] getParameterNames()
      Returns an array of the names of the parameters expected as input by this function. May return null if this function can take an unbounded number of parameters (i.e. min, max, etc.).
      返回:
      an array of the parameter names or null if there are an unbounded number of parameters.
    • setParameterDefs

      public abstract void setParameterDefs(ArrayList<Attribute> paramDefs) throws Exception
      Set the structure of the parameters that are expected as input by this function. This must be called before getOutputDef() is called.
      参数:
      paramDefs - the structure of the input parameters
      抛出:
      Exception - if the number or types of parameters are not acceptable by this function
    • getOutputDef

      public abstract Attribute getOutputDef()
      Get the structure of the result produced by this function.
      返回:
      the structure of the result produced by this function.
    • getResult

      public abstract double getResult(double[] incoming) throws Exception
      Get the result of applying this function.
      参数:
      incoming - the arguments to this function (supplied in order to match that of the parameter definitions
      返回:
      the result of applying this function. When the optype is categorical or ordinal, an index into the values of the output definition is returned.
      抛出:
      Exception - if there is a problem computing the result of this function
    • getFunction

      public static Function getFunction(String name)
      Get a built-in PMML Function.
      参数:
      name - the name of the function to get.
      返回:
      a built-in Function or null if the named function is not known/supported.
    • getFunction

      public static Function getFunction(String name, weka.core.pmml.TransformationDictionary transDict) throws Exception
      Get either a function. Built-in functions are queried first, and then DefineFunctions in the TransformationDictionary (if any).
      参数:
      name - the name of the function to get.
      transDict - the TransformationDictionary (may be null if there is no dictionary).
      返回:
      the function
      抛出:
      Exception - if the named function is not known/supported.
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • toString

      public String toString(String pad)