|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.pmml.Expression
public abstract class Expression
Constructor Summary | |
---|---|
Expression(FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs)
|
Method Summary | |
---|---|
static Expression |
getExpression(org.w3c.dom.Node container,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs,
weka.core.pmml.TransformationDictionary transDict)
Static factory method that returns a subclass of Expression that encapsulates the type of expression contained in the Element supplied. |
static Expression |
getExpression(java.lang.String name,
org.w3c.dom.Node expression,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs,
weka.core.pmml.TransformationDictionary transDict)
Static factory method that returns a subclass of Expression that encapsulates the type of expression supplied as an argument. |
Attribute |
getFieldDef(java.lang.String attName)
Return the named attribute from the list of reference fields. |
int |
getFieldDefIndex(java.lang.String attName)
|
FieldMetaInfo.Optype |
getOptype()
Get the optype of the result of applying this Expression. |
abstract double |
getResult(double[] incoming)
Get the result of evaluating the expression. |
abstract java.lang.String |
getResultCategorical(double[] incoming)
Gets the result of evaluating the expression when the optype is categorical or ordinal as the actual String value. |
double |
getResultContinuous(double[] incoming)
Get the result of evaluating the expression for continuous optype. |
void |
setFieldDefs(java.util.ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String pad)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Expression(FieldMetaInfo.Optype opType, java.util.ArrayList<Attribute> fieldDefs)
Method Detail |
---|
public void setFieldDefs(java.util.ArrayList<Attribute> fieldDefs) throws java.lang.Exception
fieldDefs
- the field definitions to use
java.lang.Exception
- if there is a problem setting the field definitionspublic abstract double getResult(double[] incoming) throws java.lang.Exception
incoming
- the incoming parameter values
java.lang.Exception
- if there is a problem computing the resultpublic double getResultContinuous(double[] incoming) throws java.lang.Exception
incoming
- the incoming parameter values
mining schema
java.lang.Exception
- if the optype is not continuous.public abstract java.lang.String getResultCategorical(double[] incoming) throws java.lang.Exception
incoming
- the incoming parameter values
java.lang.Exception
- if the optype is continuouspublic static Expression getExpression(org.w3c.dom.Node container, FieldMetaInfo.Optype opType, java.util.ArrayList<Attribute> fieldDefs, weka.core.pmml.TransformationDictionary transDict) throws java.lang.Exception
container
- the Node containing the expressionopType
- the optype of the value returned by this Expression.fieldDefs
- an ArrayList of Attributes for the fields that this
Expression may need to access
Since Expressions are children of either DerivedFields or
DefineFuntions, they will have the same optype as their parent.transDict
- the TransformationDictionary (may be null if there
is no dictionary)
java.lang.Exception
- for unsupported Expression typespublic static Expression getExpression(java.lang.String name, org.w3c.dom.Node expression, FieldMetaInfo.Optype opType, java.util.ArrayList<Attribute> fieldDefs, weka.core.pmml.TransformationDictionary transDict) throws java.lang.Exception
name
- the name of the Expression to getexpression
- the Node containing the expressionopType
- the optype of the value returned by this Expression.fieldDefs
- an ArrayList of Attributes for the fields that this
Expression may need to access
Since Expressions are children of either DerivedFields or
DefineFuntions, they will have the same optype as their parent.transDict
- the TransformationDictionary (may be null if there
is no dictionary)
java.lang.Exception
- for unsupported Expression typespublic Attribute getFieldDef(java.lang.String attName)
attName
- the name of the attribute to retrieve
public int getFieldDefIndex(java.lang.String attName)
public FieldMetaInfo.Optype getOptype()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String pad)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |