public class Discretize extends Expression
| Constructor and Description |
|---|
Discretize(Element discretize,
FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs)
Constructs a Discretize Expression
|
| Modifier and Type | Method and Description |
|---|---|
double |
getResult(double[] incoming)
Get the result of evaluating the expression.
|
String |
getResultCategorical(double[] incoming)
Gets the result of evaluating the expression when the optype is categorical
or ordinal as the actual String value.
|
void |
setFieldDefs(ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use
|
String |
toString(String pad) |
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, toStringpublic Discretize(Element discretize, FieldMetaInfo.Optype opType, ArrayList<Attribute> fieldDefs) throws Exception
discretize - the Element containing the discretize expressionopType - the optype of this Discretize ExpressionfieldDefs - the structure of the incoming fieldsException - if the optype is not categorical/ordinal or if there is a
problem parsing this elementpublic void setFieldDefs(ArrayList<Attribute> fieldDefs) throws Exception
setFieldDefs in class ExpressionfieldDefs - the field definitions to useException - if there is a problem setting the field definitionspublic double getResult(double[] incoming)
throws Exception
getResult in class Expressionincoming - the incoming parameter valuesException - if there is a problem computing the resultpublic String getResultCategorical(double[] incoming) throws Exception
getResultCategorical in class Expressionincoming - the incoming parameter valuesException - if the optype is continuouspublic String toString(String pad)
toString in class ExpressionCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.