Learn R Programming

pmml

Overview

Export various machine learning and statistical models to PMML and generate data transformations in PMML format.

For a description of the supported packages, see the vignette: Supported Packages and Additional Functions.

Installation

You can install the released version of pmml from CRAN with:

install.packages("pmml")

Example

library(pmml)

# Build an lm model
iris_lm <- lm(Sepal.Length ~ ., data=iris)

# Convert to pmml
iris_lm_pmml <- pmml(iris_lm)

# Write to file
# save_pmml(iris_lm_pmml,"iris_lm.pmml")

Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.

Copy Link

Version

Install

install.packages('pmml')

Monthly Downloads

3,435

Version

2.5.2

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

March 4th, 2022

Functions in pmml (2.5.2)

function_to_pmml

Convert an R expression to PMML.
make_intervals

Create Interval elements, most likely to add to a DataDictionary element.
audit

Audit: artificially constructed dataset
add_output_field

Add Output nodes to a PMML object.
add_attributes

Add attribute values to an existing element in a given PMML file.
houseVotes84

Modified 1984 United States Congressional Voting Records Database
add_data_field_attributes

Add attribute values to an existing DataField element in a given PMML file
file_to_xml_node

Read in a file and parse it into an object of type XMLNode.
add_data_field_children

Add 'Interval' and 'Value' child elements to a given DataField element in a given PMML file.
pmml.coxph

Generate the PMML representation for a coxph object from the package survival.
add_mining_field_attributes

Add attribute values to an existing MiningField element in a given PMML file.
pmml.ada

Generate the PMML representation for an ada object from the package ada.
pmml

Generate the PMML representation for R objects.
pmml.cv.glmnet

Generate the PMML representation for a cv.glmnet object from the package glmnet.
pmml.iForest

Generate PMML for an iForest object from the isofor package.
pmml.hclust

Generate the PMML representation for a hclust object from the package amap.
pmml.rpart

Generate the PMML representation for an rpart object from the package rpart.
pmml.randomForest

Generate the PMML representation for a randomForest object from the package randomForest.
pmml.nnet

Generate the PMML representation for a nnet object from package nnet.
xform_discretize

Discretize a continuous variable as indicated by interval mappings in accordance with the PMML element Discretize.
pmml.glm

Generate the PMML representation for a glm object from the package stats.
pmml.gbm

Generate the PMML representation for a gbm object from the package gbm.
make_output_nodes

Add Output nodes to a PMML object.
pmml.naiveBayes

Generate the PMML representation for a naiveBayes object from the package e1071.
pmml.lm

Generate the PMML representation for an lm object from the package stats.
pmml.multinom

Generate the PMML representation for a multinom object from package nnet.
pmml.rules

Generate the PMML representation for a rules or an itemset object from package arules.
make_values

Create Values element, most likely to add to a DataDictionary element.
pmml-package

pmml: Generate PMML for R Models
pmml.neighbr

Generate PMML for a neighbr object from the neighbr package.
pmml.ARIMA

Generate PMML for an ARIMA object the forecast package.
pmml.svm

Generate the PMML representation of an svm object from the e1071 package.
save_pmml

Save a pmml object as an external PMML file.
xform_norm_discrete

Normalize discrete values in accordance with the PMML element NormDiscrete.
rename_wrap_var

Rename a variable in the xform_wrap transform object.
pmml.kmeans

Generate the PMML representation for a kmeans object from the package stats.
xform_function

Add a function transformation to a xform_wrap object.
pmml.ksvm

Generate the PMML representation for a ksvm object from the package kernlab.
xform_map

Implement a map between discrete values in accordance with the PMML element MapValues.
pmml.xgb.Booster

Generate PMML for a xgb.Booster object from the package xgboost.
xform_wrap

Wrap data in a data transformations object.
xform_min_max

Normalize continuous values in accordance with the PMML element NormContinuous.
xform_z_score

Perform a z-score normalization on continuous values in accordance with the PMML element NormContinuous.