Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 1.69 KB

README.md

File metadata and controls

88 lines (56 loc) · 1.69 KB

JPMML-Evaluator-R

PMML evaluator library for R.

Features

This package provides R wrapper classes and functions for the JPMML-Evaluator library.

Prerequisites

  • Java Platform, Standard Edition 8 or newer.
  • R 3.3, 4.0 or newer.

Installation

This package has not been released to CRAN yet.

Installing the latest snapshot version from GitHub using the devtools package:

library("devtools")

install_github("jpmml/jpmml-evaluator-r")

Usage

Building a verified model evaluator from a PMML file:

library("jpmml")
library("magrittr") # Defines the `%>%` operator

evaluator = newLoadingModelEvaluatorBuilder() %>%
	loadFile("DecisionTreeIris.pmml") %>%
	build()

evaluator = evaluator %>%
	verify()

Evaluating a single data record:

arguments = list(
	"Sepal.Length" = 5.1,
	"Sepal.Width" = 3.5,
	"Petal.Length" = 1.4,
	"Petal.Width" = 0.2
)

results = evaluator %>%
	evaluate(arguments)

print(results)

Evaluating a collection of data records:

data(iris)

argumentsDf = iris

resultsDf = evaluator %>%
	evaluateAll(argumentsDf)

print(resultsDf)

De-installation

Removing the package:

remove.packages("jpmml")

License

JPMML-Evaluator-R is licensed under the terms and conditions of the GNU Affero General Public License, Version 3.0.

Additional information

JPMML-Evaluator-R is developed and maintained by Openscoring Ltd, Estonia.

Interested in using Java PMML API software in your company? Please contact [email protected]