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 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.
Note that newer versions of SPSS export models into PMML version 3.1. Given that ADAPA consumes PMML 3.2, any SPSS export will have to be converted from 3.1 to 3.2 before being loaded into 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.

0 comments: