I've just started learning a bit about PMML and I think that the TreeModel almost fits what I'm trying to achieve, but I’ve got a question I haven't been able to solve reading the documentation:
Is it possible to make a TreeModel return multiple values? I've found some examples of TreeModels, but all of them just declare a single "predicted" field and what I need is that if the predicate of a node evaluates to TRUE , the model returns multiple values. Is that even possible? If so, how would you implement that?
EDIT
Added an example of what I want to achieve:
In the documentation for the TreeModel in the section Scoring Procedure, there's an example of a TreeModel named "golfing". In that example, please correct if I'm wrong, the logical structure that tells which value will be asigned to the field(predicted) "whatIdo", once the model is evaluated could be expressed this way:
if(outlook=="sunny") {
whatIdo="will play";
if(temperature<90 AND temperature>50){
whatIdo="will play";
if(humidity<80){
whatIdo="will play";
}
else if(humidity>=80){
whatIdo="no play";
}
}
else if(temperature>=90 OR temperature<=50){
whatIdo="no play";
}
}
else if(outlook=="overcast" OR outlook=="rain"){
whatIdo="may play";
if(temperature > 60 AND temperature < 100 AND outlook="overcast" AND humidity <70 AND windy="false"){
whatIdo="may play";
}
else if(outlook=="rain" AND humidity<70 ){
whatIdo="no play";
}
}
What I need to know is if apart from the whatIdo field, I could return other values, for example an additional field named : "whatElseIdo". Would it be possible to create a PMML model that, for example based on the "golfing" model, returns an extra field as the following conditional does :
if(outlook=="sunny") {
whatIdo="will play";
whatElseIdo="will have a picnic";
if(temperature<90 AND temperature>50){
whatIdo="will play";
whatElseIdo="will have a picnic";
if(humidity<80){
whatIdo="will play";
whatElseIdo="will have a picnic";
}
else if(humidity>=80){
whatIdo="no play";
whatElseIdo="no have a picnic";
}
}
else if(temperature>=90 OR temperature<=50){
whatIdo="no play";
whatElseIdo="no have a picnic";
}
}
else if(outlook=="overcast" OR outlook=="rain"){
whatIdo="may play";
whatElseIdo="may have a picnic";
if(temperature > 60 AND temperature < 100 AND outlook="overcast" AND humidity <70 AND windy="false"){
whatIdo="may play";
whatElseIdo="may have a picnic";
}
else if(outlook=="rain" AND humidity<70 ){
whatIdo="no play";
whatElseIdo="no have a picnic";
}
}
Thanks.