Predictive Model Markup Language
The Predictive Model Markup Language is an XML-based predictive model interchange format conceived by Dr. Robert Lee Grossman, then the director of the National Center for Data Mining at the University of Illinois at Chicago. PMML provides a way for analytic applications to describe and exchange predictive models produced by data mining and machine learning algorithms. It supports common models such as logistic regression and other feedforward neural networks. Version 0.9 was published in 1998. Subsequent versions have been developed by the Data Mining Group.
Since PMML is an XML-based standard, the specification comes in the form of an XML schema. PMML itself is a mature standard with over 30 organizations having announced products supporting PMML.
PMML Components
A PMML file can be described by the following components:- Header: contains general information about the PMML document, such as copyright information for the model, its description, and information about the application used to generate the model such as name and version. It also contains an attribute for a timestamp which can be used to specify the date of model creation.
- Data Dictionary: contains definitions for all the possible fields used by the model. It is here that a field is defined as continuous, categorical, or ordinal. Depending on this definition, the appropriate value ranges are then defined as well as the data type.
- Data Transformations: transformations allow for the mapping of user data into a more desirable form to be used by the mining model. PMML defines several kinds of simple data transformations.
- * Normalization: map values to numbers, the input can be continuous or discrete.
- * Discretization: map continuous values to discrete values.
- * Value mapping: map discrete values to discrete values.
- * Functions : derive a value by applying a function to one or more parameters.
- * Aggregation: used to summarize or collect groups of values.
- Model: contains the definition of the data mining model. E.g., A multi-layered feedforward neural network is represented in PMML by a "NeuralNetwork" element which contains attributes such as:
- * Model Name
- * Function Name
- * Algorithm Name
- * Activation Function
- * Number of Layers
- Mining Schema: a list of all fields used in the model. This can be a subset of the fields as defined in the data dictionary. It contains specific information about each field, such as:
- * Name : must refer to a field in the data dictionary
- * Usage type : defines the way a field is to be used in the model. Typical values are: active, predicted, and supplementary. Predicted fields are those whose values are predicted by the model.
- * Outlier Treatment : defines the outlier treatment to be use. In PMML, outliers can be treated as missing values, as extreme values, or as is.
- * Missing Value Replacement Policy : if this attribute is specified then a missing value is automatically replaced by the given values.
- * Missing Value Treatment : indicates how the missing value replacement was derived.
- Targets: allows for post-processing of the predicted value in the format of scaling if the output of the model is continuous. Targets can also be used for classification tasks. In this case, the attribute priorProbability specifies a default probability for the corresponding target category. It is used if the prediction logic itself did not produce a result. This can happen, e.g., if an input value is missing and there is no other method for treating missing values.
- Output: this element can be used to name all the desired output fields expected from the model. These are features of the predicted field and so are typically the predicted value itself, the probability, cluster affinity, standard error, etc. The latest release of PMML, PMML 4.1, extended Output to allow for generic post-processing of model outputs. In PMML 4.1, all the built-in and custom functions that were originally available only for pre-processing became available for post-processing too.
PMML 4.0, 4.1, 4.2 and 4.3
Examples of new features included:
- Improved Pre-Processing Capabilities: Additions to built-in functions include a range of Boolean operations and an If-Then-Else function.
- Time Series Models: New exponential Smoothing models; also place holders for ARIMA, Seasonal Trend Decomposition, and Spectral density estimation, which are to be supported in the near future.
- Model Explanation: Saving of evaluation and model performance measures to the PMML file itself.
- Multiple Models: Capabilities for model composition, ensembles, and segmentation.
- Extensions of Existing Elements: Addition of multi-class classification for Support Vector Machines, improved representation for Association Rules, and the addition of Cox Regression Models.
New features included:
- New model elements for representing Scorecards, k-Nearest Neighbors and Baseline Models.
- Simplification of multiple models. In PMML 4.1, the same element is used to represent model segmentation, ensemble, and chaining.
- Overall definition of field scope and field names.
- A new attribute that identifies for each model element if the model is ready or not for production deployment.
- Enhanced post-processing capabilities.
New features include:
- Transformations: New elements for implementing text mining
- New built-in functions for implementing regular expressions: matches, concat, and replace
- Simplified outputs for post-processing
- Enhancements to Scorecard and Naive Bayes model elements
New features include:
- New Model Types:
- * Gaussian Process
- * Bayesian Network
- New built-in functions
- Usage clarifications
- Documentation improvements
Release history