|
||||||||||||||
|
||||||||||||||
| ||||||||||||||
PMML 4.0 - Target Fields and ValuesIntroductionThe target values are derived from a variety of elements in the models.
For example, the target categories in RegressionModel are
specified in the RegressionTable elements, while the TreeModel
defines them within Node elements
and NaiveBayesModel specifies them in TargetValueCounts.
The PMML element
Schema
The attribute field must refer to a name of a DataField or DerivedField. When Target specifies optype then it overrides the optype attribute in a corresponding MiningField, if it exists. If the target does not specify optype then the MiningField is used as default. And, in turn, if the MiningField does not specify an optype, it is taken from the corresponding DataField. In other words, a MiningField overrides a DataField, and a Target overrides a MiningField. If a regression model should predict integers, use the attribute castInteger to control how decimal places should be handled: round: round to nearest integer, e.g., 2.718 becomes 3, -2.89 becomes -3 ceiling: smallest integer greater than or equal, e.g., 2.718 becomes 3, -1.2 becomes -1 floor: largest integer smaller than or equal, e.g., 2.718 becomes 2, -1.2 becomes -2 If min is present, the predicted value will be the value of min if it is smaller than that. If max is present, the predicted value will be max if it is larger than that. rescaleFactor and rescaleConstant can be used for simple rescale of the predicted value: First off, the predicted value is multiplied by rescaleFactor. After that, rescaleConstant is added to the predicted value. Note that castInteger, min, max, rescaleConstant and rescaleFactor only apply to models of type regression. Furthermore, they must be applied in sequence, which is:
In classification models, TargetValue is required. For regression models, TargetValue is only optional. Partition is an optional element to provide distribution information for all records that were assigned to the respective class label.
The attribute value corresponds to the class labels in a classification model. This is, for example, equivalent to categories in RegressionTable, tree Node,
neural network NeuralOutput or Bayes TargetValueCounts. The attribute priorProbability specifies a default probability for the corresponding target category. It is used if the prediction logic itself did not produce a result. This can happen, e.g., if an input value is missing and there is no other method for treating missing values. The exact rules for using the prior probability are defined in the particular models. The attribute defaultValue is the counterpart of prior probabilities for continuous fields. Usually the value is the mean of the target values in the training data.
The attribute priorProbability is used only if the optype of the field is categorical or ordinal.
The attribute defaultValue is used only if the optype of the field is continuous.
NotesNote that the Schema allows multiple target fields. It depends on the kind of the model whether prediction of multiple fields is supported.Further notes:
TargetFields are usually declared with usageType="predicted" in MiningField. The list of TargetValues within a TargetField is similar to the list of valid values in a DataField. However, the DataField defines the values that are allowed as input to the model, while the TargetValues describe properties of the predicted values in a mining result. The default probabilities and the defaultValues do not necessarily describe statistical properties of a TargetField as found in the training data. For example, the defaultValue can be the mean of the actual values in the training data but it could also be the median or any other value that was chosen during training. The same goes for the default probabilities. They are usually the prior probabilities of respective values in the training data. But they can also be any other adjusted probability. |
||||||||||||||
|