|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.pmml.Expression
weka.core.pmml.Discretize
public class Discretize
Class encapsulating a Discretize Expression.
Constructor Summary | |
---|---|
Discretize(org.w3c.dom.Element discretize,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs)
Constructs a Discretize Expression |
Method Summary | |
---|---|
double |
getResult(double[] incoming)
Get the result of evaluating the expression. |
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. |
void |
setFieldDefs(java.util.ArrayList<Attribute> fieldDefs)
Set the field definitions for this Expression to use |
java.lang.String |
toString(java.lang.String pad)
|
Methods inherited from class weka.core.pmml.Expression |
---|
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Discretize(org.w3c.dom.Element discretize, FieldMetaInfo.Optype opType, java.util.ArrayList<Attribute> fieldDefs) throws java.lang.Exception
discretize
- the Element containing the discretize expressionopType
- the optype of this Discretize ExpressionfieldDefs
- the structure of the incoming fields
java.lang.Exception
- if the optype is not categorical/ordinal or if there
is a problem parsing this elementMethod Detail |
---|
public void setFieldDefs(java.util.ArrayList<Attribute> fieldDefs) throws java.lang.Exception
setFieldDefs
in class Expression
fieldDefs
- the field definitions to use
java.lang.Exception
- if there is a problem setting the field definitionspublic double getResult(double[] incoming) throws java.lang.Exception
getResult
in class Expression
incoming
- the incoming parameter values
java.lang.Exception
- if there is a problem computing the resultpublic java.lang.String getResultCategorical(double[] incoming) throws java.lang.Exception
getResultCategorical
in class Expression
incoming
- the incoming parameter values
java.lang.Exception
- if the optype is continuouspublic java.lang.String toString(java.lang.String pad)
toString
in class Expression
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |