Package weka.core.pmml
Class TargetMetaInfo
java.lang.Object
weka.core.pmml.FieldMetaInfo
weka.core.pmml.TargetMetaInfo
- All Implemented Interfaces:
Serializable
Class to encapsulate information about a Target.
- Version:
- $Revision 1.0 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class weka.core.pmml.FieldMetaInfo
FieldMetaInfo.Interval, FieldMetaInfo.Optype, FieldMetaInfo.Value
-
Method Summary
Modifier and TypeMethodDescriptiondouble
applyMinMaxRescaleCast
(double prediction) Apply min and max, rescaleFactor, rescaleConstant and castInteger - in that order (where defined).double
Get the default value (numeric target)Return this field as an Attribute.double
getPriorProbability
(String value) Get the prior probability for the supplied value.Get the values (discrete case only) for this Target.Methods inherited from class weka.core.pmml.FieldMetaInfo
getFieldName, getOptype
-
Method Details
-
getPriorProbability
Get the prior probability for the supplied value.- Parameters:
value
- the value to get the probability for- Returns:
- the probability
- Throws:
Exception
- if there are no TargetValues defined or if the supplied value is not in the list of TargetValues
-
getDefaultValue
Get the default value (numeric target)- Returns:
- the default value
- Throws:
Exception
- if there is no TargetValue defined
-
getValues
Get the values (discrete case only) for this Target. Note: the list may be empty if the pmml doesn't specify any values.- Returns:
- the values of this Target
-
applyMinMaxRescaleCast
Apply min and max, rescaleFactor, rescaleConstant and castInteger - in that order (where defined).- Parameters:
prediction
- the prediction to apply these modification to- Returns:
- the modified prediction
- Throws:
Exception
- if this target is not a continuous one
-
getFieldAsAttribute
Return this field as an Attribute.- Specified by:
getFieldAsAttribute
in classFieldMetaInfo
- Returns:
- an Attribute for this field.
-