Learn R Programming

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

pmml

Overview

This package contains functions to export various machine learning and statistical models to PMML, as well as generate data transformations in PMML format.

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

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.1.0

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Tridivesh Jena

Last Published

September 13th, 2019

Functions in pmml (2.1.0)

add_data_field_attributes

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

Generate the PMML representation for R objects.
pmml.iForest

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

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

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

Generate the PMML representation for a hclust object from the package amap.
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.glm

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

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

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

pmml: Generate PMML for R Models
pmml.naiveBayes

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

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

Rename a variable in the xform_wrap transform object.
make_values

Create Values element, most likely to add to a DataDictionary element.
make_output_nodes

Add Output nodes to a PMML object.
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.
save_pmml

Save a pmml object as an external PMML file.
pmml.ada

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

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

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

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

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

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

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

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

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

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

Wrap data in a data transformations object.
xform_z_score

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

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

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

Audit: artificially constructed dataset
add_mining_field_attributes

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

Convert an R expression to PMML.
add_output_field

Add Output nodes to a PMML object.
houseVotes84

Modified 1984 United States Congressional Voting Records Database
add_data_field_children

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

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