There are many reasons for the validation test to fail. I can think of two main reasons.
1) The model ADAPA loaded and executed may be different than the model you built in your development environment. This may reflect a problem with ADAPA or see below.
2) It may be the case that the PMML file you got out of your model development environment does not really represent all aspects of the model or is problematic semantically speaking.
In both cases, you can try to follow ADAPA's decisions by clicking on the computed value which is a hyperlink and follow through its log of computations which are displayed as a text file. This may be very helpful in determining why ADAPA generated the value(s) it did.
Also, the problem may have to do with your data validation file itself. It may be the case that you generated your model in SPSS, for example, exported it as a PMML, converted it using the iGoogle converter and uploaded it into ADAPA. So far so good, but how about the data? If you saved your data in SPSS as well, you have to make sure you saved the expected value or prediction with the correct name. SPSS usually calls this value "PRE_1." You will need to change the name of this variable to the name of the predicted variable defined in the PMML file. Also, if your data contains the original target used to build the model, you will need to rename it to something different than the predicted variable. Your new predicted variable now should be the predicted result you got out of SPSS or any model development environment you used to score the data in the first place.
Showing posts with label SPSS. Show all posts
Showing posts with label SPSS. Show all posts
Wednesday, April 16, 2008
ADAPA's computed value is not the same as the expected value, why is that?
Labels:
Model Verification,
Score Matching,
SPSS,
Testing
Wednesday, March 12, 2008
I am having problems converting regression models generated in SPSS from PMML 3.1 to 3.2. Can you help?
Sometimes, unreadable characters are introduced into the XML file exported from SPSS for some regression models (PMML element General Regression).
This happens usually when the PMML tag on the top of the file refers to http://xml.spss.com/spss/spss-logreg instead of http://www.dmg.org/PMML-3_1.
Whenever a file containing unreadable character is uploaded to the PMML converter, an error will be produced with the following message: "this is not an xml file". In cases like this, we suggest you locate where any unreadable characters may be located and delete them before conversion. If you have more specific information about this problem, please let us know.
This happens usually when the PMML tag on the top of the file refers to http://xml.spss.com/spss/spss-logreg instead of http://www.dmg.org/PMML-3_1.
Whenever a file containing unreadable character is uploaded to the PMML converter, an error will be produced with the following message: "this is not an xml file". In cases like this, we suggest you locate where any unreadable characters may be located and delete them before conversion. If you have more specific information about this problem, please let us know.
Labels:
PMML Converter,
PMML Export,
SPSS
Thursday, February 21, 2008
How can I export PMML from SPSS?
In newer versions of SPSS (I believe starting with version 14), you can export many different modeling techniques into PMML. For some techniques, it also exports the transformations that are applied to the input data before the model is built.
In SPSS version 16, you can export PMML for neural networks (back-propagation and radial-basis) by selecting the Export tab on the model building menu. Note that scaling of numerical variables and dummy-fication of categorical variables is expressed in the resulting PMML file under the TransformationDictionary element.
SPSS PMML issues:
We have made available a list of converters from older versions of PMML (2.1, 3.0, and 3.1) to version 3.2. These converters also correct the SPSS problems mentioned above. In this way, your SPSS generated models can be uploaded successfully into ADAPA. All converters are available on the Zementis web site through our PMML Converter Tool or in form of an iGoogle gadget.
In SPSS version 16, you can export PMML for neural networks (back-propagation and radial-basis) by selecting the Export tab on the model building menu. Note that scaling of numerical variables and dummy-fication of categorical variables is expressed in the resulting PMML file under the TransformationDictionary element.
SPSS PMML issues:
- We have noticed a problem with the resulting PMML file whenever data transformations are present. In the PMML schema, the element DerivedField is required to have attributes optype and dataType, which are missing in the SPSS export. If you try to load any model that is not conforming to the PMML schema into ADAPA, it will complain and refuse to upload such a model.
- Also, SPSS generates PMML code with SPSS originated tags, like x-Basis, which are not part of PMML. Such tags are constrained around model information which is not necessary for your model to run successfully in ADAPA. However, to conform to the PMML schema, these need to be deleted from the PMML file.
- SPSS generates models without a modelName. Although this is not a required field in PMML, it is convenient to have a name for your model so that it can be managed easily in ADAPA.
We have made available a list of converters from older versions of PMML (2.1, 3.0, and 3.1) to version 3.2. These converters also correct the SPSS problems mentioned above. In this way, your SPSS generated models can be uploaded successfully into ADAPA. All converters are available on the Zementis web site through our PMML Converter Tool or in form of an iGoogle gadget.
Labels:
PMML Converter,
PMML Export,
SPSS
Thursday, February 7, 2008
How can I export PMML code from older versions of SPSS?
In older versions of SPSS, like SPSS 11.5, a linear regression model can be exported to PMML by going through the following sequence of menus: Analyze -> Regression -> Linear... -> Save... You will find yourself in box "Linear Regression: Save". Enter the file name and location you want the PMML file to be written to in "Export model information to XML file" at the bottom of the "Save" box.
After the model is trained, a file will be created in the specified location containing a PMML representation of your linear regression model. A similar sequence of actions and results should work for Multinomial Logistic models.
Important things to notice about the PMML file:
1) The model is represented as a general regression PMML element;
2) For older versions of SPSS (like 11.5), the export is in PMML 2.0. This file will need to be converted to PMML 3.2 before it can be uploaded into ADAPA.
3) For SPSS versions up to version 14, data transformations are not part of the PMML file. Therefore, you will need to add any data transformations manually.
After the model is trained, a file will be created in the specified location containing a PMML representation of your linear regression model. A similar sequence of actions and results should work for Multinomial Logistic models.
Important things to notice about the PMML file:
1) The model is represented as a general regression PMML element;
2) For older versions of SPSS (like 11.5), the export is in PMML 2.0. This file will need to be converted to PMML 3.2 before it can be uploaded into ADAPA.
3) For SPSS versions up to version 14, data transformations are not part of the PMML file. Therefore, you will need to add any data transformations manually.
Labels:
PMML,
PMML Export,
SPSS
Subscribe to:
Posts (Atom)