|
||||||||||
| 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,
ArrayList<Attribute> fieldDefs)
|
|
| Method Summary | |
|---|---|
static Expression |
getExpression(Node container,
FieldMetaInfo.Optype opType,
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(String name,
Node expression,
FieldMetaInfo.Optype opType,
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(String attName)
Return the named attribute from the list of reference fields. |
int |
getFieldDefIndex(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 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(ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use |
String |
toString()
|
String |
toString(String pad)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Expression(FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs)
| Method Detail |
|---|
public void setFieldDefs(ArrayList<Attribute> fieldDefs)
throws Exception
fieldDefs - the field definitions to use
Exception - if there is a problem setting the field definitions
public abstract double getResult(double[] incoming)
throws Exception
incoming - the incoming parameter values
Exception - if there is a problem computing the result
public double getResultContinuous(double[] incoming)
throws Exception
incoming - the incoming parameter values
mining schema
Exception - if the optype is not continuous.
public abstract String getResultCategorical(double[] incoming)
throws Exception
incoming - the incoming parameter values
Exception - if the optype is continuous
public static Expression getExpression(Node container,
FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs,
weka.core.pmml.TransformationDictionary transDict)
throws 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)
Exception - for unsupported Expression types
public static Expression getExpression(String name,
Node expression,
FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs,
weka.core.pmml.TransformationDictionary transDict)
throws 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)
Exception - for unsupported Expression typespublic Attribute getFieldDef(String attName)
attName - the name of the attribute to retrieve
public int getFieldDefIndex(String attName)
public FieldMetaInfo.Optype getOptype()
public String toString()
toString in class Objectpublic String toString(String pad)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||