Package weka.core.pmml
Class DerivedFieldMetaInfo
java.lang.Object
weka.core.pmml.FieldMetaInfo
weka.core.pmml.DerivedFieldMetaInfo
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class weka.core.pmml.FieldMetaInfo
FieldMetaInfo.Interval, FieldMetaInfo.Optype, FieldMetaInfo.Value
-
Constructor Summary
ConstructorDescriptionDerivedFieldMetaInfo
(Element derivedField, ArrayList<Attribute> fieldDefs, weka.core.pmml.TransformationDictionary transDict) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getDerivedValue
(double[] incoming) Get the derived field value for the given incoming vector of values.Get this derived field as an Attribute.void
setFieldDefs
(ArrayList<Attribute> fieldDefs) Upadate the field definitions for this derived fieldvoid
setFieldDefs
(Instances fields) Upadate the field definitions for this derived fieldtoString()
Methods inherited from class weka.core.pmml.FieldMetaInfo
getFieldName, getOptype
-
Constructor Details
-
Method Details
-
setFieldDefs
Upadate the field definitions for this derived field- Parameters:
fieldDefs
- the fields as an ArrayList of Attributes- Throws:
Exception
- if there is a problem setting the field definitions
-
setFieldDefs
Upadate the field definitions for this derived field- Parameters:
fields
- the fields as an Instances object- Throws:
Exception
- if there is a problem setting the field definitions
-
getFieldAsAttribute
Get this derived field as an Attribute.- Specified by:
getFieldAsAttribute
in classFieldMetaInfo
- Returns:
- an Attribute for this derived field.
-
getDerivedValue
Get the derived field value for the given incoming vector of values. Incoming values are assumed to be in the same order as the attributes supplied in the field definitions ArrayList used to construct this DerivedField. If the optype of this derived field is continuous, then a real number is returned. Otherwise, the number returned is the index of the categorical/ordinal value corresponding to result of computing the derived field value.- Parameters:
incoming
- the incoming parameter values- Returns:
- the result of computing the derived value
- Throws:
Exception
- if there is a problem computing the value
-
toString
-