-
Task
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
None
-
8
-
NEW
-
NEW
From [Output|http://dmg.org/pmml/v4-4/Output.html] documentation:
"If present, the attribute targetField must refer either to a MiningField of usage type target or a field described in Targets element. targetField is a required attribute in case the model has multiple target fields."
"predictedValue
Select the raw predicted value. More than one OutputField element can have the predictedValue feature only if the model predicts more than one field. Details can be found in the description of the individual models."
From [MiningSchema|http://dmg.org/pmml/v4-4/MiningSchema.html] documentation:
"predicted: field whose value is predicted by the model. As of PMML 4.2, this is deprecated and it has been replaced by the usage type target."
So, predicted field(s) is/are the one(s) defined as "target/predicted" inside MiningSchema or the one(s) defined inside [Targets|http://dmg.org/pmml/v4-4/Targets.html] element.
Output has to be considered as additional results; it does not necessarily contains the target/predicted value; but the target/predicted value should always be returned.
Currently, DMN (see DMNKiePMMLInvocationEvaluator as example) implement the following algorithm:
1) if "Output" element is present, it only manage it (ignores MiningSchema fields)
2) if "Output" element is not present, it retrieves "target" from MiningSchema.
This approach has the following issues
1) it is not mandatory to have the "target/predicted" field referenced inside the "Output" element; but with the current implementation, the user is "forced" to duplicate target reference inside "Output" if s/he wants additional outputs from model
2) it completely ignores "Targets" element
With this PR, DMN will manage both the Output elements (if present) and all the target/predicted fields, regardless of where/how they are defined.
If such target/predicted fields is/are referred also in Output element, only the one(s) inside Output will be managed.
If Output does not define "target/predicted" OutputField(s), the one(s) from MiningSchema or Targets will be managed.