Skip to content

jpmml/jpmml-evaluator-r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]

Releases

No releases published

Packages

No packages published

Languages