I have been trying to understand how the "output" fields are recognized from the model and translated to represent the "output tag" in the PMML file.
I have been using an RDS file (Linear Regression) for some analysis and converted it to PMML format via the JPMML-R command line tool. In this generated PMML document, I do not see the "output tag" at all. The data dictionary, mining schema and regression table are however present in the PMML. So, I was curious to know how JPMML-R or R2PMML (which was not used in this case) identifies the output fields?
PS: My testing* and scoring functionalities are in separate files. Hence, adding of a new empty output column and my predict() operation happens in a different R file altogether, that JPMML-R does not know about.
I have been trying to understand the how r2pmml is able to recognize the output fields from a previous example I tried. [Screenshot attached]
Here, there are 2 output fields created as a part of the writeAudit function i.e "Probability_0" and "Probability_1".
However, when one observes the the sequence of execution inside the generateGeneralRegressionAudit function, we see that the glm is called first, r2pmml is called next and a pmml file is generated at this step and ONLY then predict() function is called, after which writeAudit() is triggered. So how does r2pmml know in advance about the output fields because technically writeAudit() comes after the execution of the r2pmml statement..
(1) Does it mean that I need to declare my new empty output column somewhere before I construct my model in the same testing* R script for JPMML-R to recognize the output column?
(2) Are there any other reasons for the "output" not being shown in the PMML file in the cases that you have encountered till date?
Any insight on this would be really helpful.
Thanks.
I am going through the code..In my case the <Output> </Output> isn't empty but the " <Output> </Output>" tags also seem to be missing which makes me wonder is it because I used step() with direction "both", after my lm() function and saved my "step" object as RDS?
Does JPMML support step() yet?
Thank you for the explanation. I am experimenting with a few related things at the moment and will open a Feature Request on GitHub when I get some clarity on what I'm trying to build.
From what you have stated above, looks like JPMML will still somehow be aware of what is the target field to "compute" from the model in "Case B" as well, even though there is no explicit output tag, am I understanding it right?