public class TargetMetaInfo extends FieldMetaInfo implements java.io.Serializable
FieldMetaInfo.Interval, FieldMetaInfo.Optype, FieldMetaInfo.Value| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
m_castInteger
cast integers (default no casting)
|
protected double[] |
m_defaultValueOrPriorProbs
default value (numeric) or prior distribution (categorical)
|
protected java.util.ArrayList<java.lang.String> |
m_displayValues
corresponding display values
|
protected double |
m_max |
protected double |
m_min
min and max
|
protected double |
m_rescaleConstant
re-scaling of target value (if defined)
|
protected double |
m_rescaleFactor |
protected java.util.ArrayList<java.lang.String> |
m_values
for categorical values.
|
m_fieldName, m_optype| Modifier | Constructor and Description |
|---|---|
protected |
TargetMetaInfo(org.w3c.dom.Element target)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
applyMinMaxRescaleCast(double prediction)
Apply min and max, rescaleFactor, rescaleConstant and castInteger - in
that order (where defined).
|
double |
getDefaultValue()
Get the default value (numeric target)
|
Attribute |
getFieldAsAttribute()
Return this field as an Attribute.
|
double |
getPriorProbability(java.lang.String value)
Get the prior probability for the supplied value.
|
java.util.ArrayList<java.lang.String> |
getValues()
Get the values (discrete case only) for this Target.
|
getFieldName, getOptypeprotected double m_min
protected double m_max
protected double m_rescaleConstant
protected double m_rescaleFactor
protected java.lang.String m_castInteger
protected double[] m_defaultValueOrPriorProbs
protected java.util.ArrayList<java.lang.String> m_values
protected java.util.ArrayList<java.lang.String> m_displayValues
protected TargetMetaInfo(org.w3c.dom.Element target)
throws java.lang.Exception
target - the Element encapsulating a Targetjava.lang.Exception - if there is a problem reading the Targetpublic double getPriorProbability(java.lang.String value)
throws java.lang.Exception
value - the value to get the probability forjava.lang.Exception - if there are no TargetValues defined or
if the supplied value is not in the list of TargetValuespublic double getDefaultValue()
throws java.lang.Exception
java.lang.Exception - if there is no TargetValue definedpublic java.util.ArrayList<java.lang.String> getValues()
public double applyMinMaxRescaleCast(double prediction)
throws java.lang.Exception
prediction - the prediction to apply these modification tojava.lang.Exception - if this target is not a continuous onepublic Attribute getFieldAsAttribute()
getFieldAsAttribute in class FieldMetaInfo