Showing posts with label PMML Converter. Show all posts
Showing posts with label PMML Converter. Show all posts

Monday, March 17, 2008

How do I use the PMML 3.2 Converter?

For a video tutorial on how to use the PMML 3.2 Converter, click here ...

Simple, just "Browse" for your old PMML file (versions 2.1, 3.0, or 3.1). Once you find it, click on "Convert". If the model is converted successfully, it will be available for download. Just click on the link provided (see image below) and save the file locally.



You can then use your new PMML 3.2 file in ADAPA. Check the ADAPA Predictive Analytics demo on the Zementis website.

Note that the converter expects valid PMML files. Auto-generated PMML code may sometimes contain elements that are not valid PMML. In that case, the converter will display a message stating that your file does not conform to the PMML specification. You will be able to take a look at the identified problems by clicking on the "details" hyperlink. Any errors encountered will have specific comments generated by the converter. On the very top of the file, there is also a summary comment stating how many total problems were encountered during conversion. You can use this information as feedback to obtain a valid PMML file before attempting conversion again.

For supported PMML elements as well as known issues with auto-generated PMML code, check our other blogs under the "PMML Converter" label.

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.

Wednesday, February 27, 2008

Can I use the PMML converter to convert any kind of modeling technique to PMML 3.2?

You can use the PMML converter to validate your PMML file against the specification for versions 2.1, 3.0, 3.1, and 3.2. If validation is not successful, the converter will give you a file back with explanations for why the validation failed (click on the "details" hyper-link).

So, before actual conversion takes place, the validation phase needs to be successful, i.e. your file needs to conform to the PMML specification as published in the DMG website (for any of the older PMML versions listed above).

The PMML converter will only convert the following model elements to PMML 3.2:
  • Neural Networks

  • Decision Trees

  • Support Vector Machines

  • General Regression

  • Regression

It will also convert pre- and post-processing PMML elements.

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.

Thursday, February 7, 2008

How can I export PMML code from R?

A PMML package for R that exports all kinds of predictive models is available from Togaware. Go to the site shown in the link below and download the PMML package (or get it through CRAN):

http://rattle.togaware.com/

Zementis has contributed exporter functionality for the following R packages/functions:

1) ksvm (Support Vector Machines);

2) nnet (Neural Networks).

Both ksvm and nnet export PMML 3.2.

We have also updated the linear and binary logistic regression function to also export PMML 3.2. This function works with R package glm.

In addition to the models listed above, the pmml package also offers PMML 3.1 export for decision trees (package rpart) and clustering models. You can use the PMML Converter to convert decision trees from version 3.1 to 3.2 and upload them into ADAPA.