Learn R Programming

⚠️There's a newer version (2.5.2) of this package.Take me there.

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

2,308

Version

2.5.1

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Dmitriy Bolotov

Last Published

November 6th, 2021

Functions in pmml (2.5.1)

make_intervals

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

Add Output nodes to a PMML object.
add_data_field_attributes

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

Convert an R expression to PMML.
audit

Audit: artificially constructed dataset
houseVotes84

Modified 1984 United States Congressional Voting Records Database
file_to_xml_node

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

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

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

pmml: Generate PMML for R Models
add_mining_field_attributes

Add attribute values to an existing MiningField element in a given PMML file.
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.
pmml.ARIMA

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

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

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

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

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

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

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

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

Generate the PMML representation for R objects.
pmml.kmeans

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

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

Generate the PMML representation for a randomForest object from the package randomForest.
xform_function

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

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

Save a pmml object as an external PMML file.
xform_map

Implement a map between discrete values in accordance with the PMML element MapValues.
xform_discretize

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

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

Generate the PMML representation for an rfsrc object from the package randomForestSRC.
xform_wrap

Wrap data in a data transformations object.
make_output_nodes

Add Output nodes to a PMML object.
make_values

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

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

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

Generate PMML for an iForest object from the isofor package.
rename_wrap_var

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

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

Normalize discrete values in accordance with the PMML element NormDiscrete.
pmml.rules

Generate the PMML representation for a rules or an itemset object from package arules.
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.