R Feedzai OpenML implementation for Caret

Contains classes and logic related with the import of Caret models in Pulse

License

License

GroupId

GroupId

com.feedzai
ArtifactId

ArtifactId

openml-caret
Last Version

Last Version

0.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

R Feedzai OpenML implementation for Caret
Contains classes and logic related with the import of Caret models in Pulse
Project Organization

Project Organization

Feedzai

Download openml-caret

How to add to project

<!-- https://jarcasting.com/artifacts/com.feedzai/openml-caret/ -->
<dependency>
    <groupId>com.feedzai</groupId>
    <artifactId>openml-caret</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.feedzai/openml-caret/
implementation 'com.feedzai:openml-caret:0.4.0'
// https://jarcasting.com/artifacts/com.feedzai/openml-caret/
implementation ("com.feedzai:openml-caret:0.4.0")
'com.feedzai:openml-caret:jar:0.4.0'
<dependency org="com.feedzai" name="openml-caret" rev="0.4.0">
  <artifact name="openml-caret" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.feedzai', module='openml-caret', version='0.4.0')
)
libraryDependencies += "com.feedzai" % "openml-caret" % "0.4.0"
[com.feedzai/openml-caret "0.4.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.google.auto.service : auto-service jar 1.0-rc2
com.feedzai : openml-r-common jar 0.4.0
org.rosuda.REngine : Rserve jar 1.8.1

provided (6)

Group / Artifact Type Version
com.feedzai : openml-api jar 1.1.0
com.feedzai : openml-utils jar 1.1.0
com.google.guava : guava jar
commons-io : commons-io jar 2.4
com.fasterxml.jackson.core : jackson-databind jar 2.6.7
com.fasterxml.jackson.core : jackson-annotations jar 2.6.7

test (4)

Group / Artifact Type Version
com.feedzai : openml-utils test-jar 1.1.0
com.fasterxml.jackson.core : jackson-core jar 2.6.7
junit : junit jar 4.13.1
org.assertj : assertj-core jar 3.7.0

Project Modules

There are no modules declared in this project.

Feedzai OpenML Provider for R

Build Status codecov Codacy Badge

Implementations of the Feedzai OpenML API to allow support for machine learning models in the R programming language using RServe.

Modules

Generic R

Maven metadata URI

The openml-generic-r module contains a provider that allows developers to load R code that conforms to a simple API. This is the most powerful approach (yet more cumbersome) since models can actually hold state.

The provider can be pulled from Maven Central:

<dependency>
  <groupId>com.feedzai</groupId>
  <artifactId>openml-generic-r</artifactId>
  <!-- See project tags for latest version -->
  <version>0.4.0</version>
</dependency>

Caret

Maven metadata URI

The implementation in the openml-caret module adds support for models built with Caret.

This module can be pulled from Maven Central:

<dependency>
  <groupId>com.feedzai</groupId>
  <artifactId>openml-caret</artifactId>
  <!-- See project tags for latest version -->
  <version>0.4.0</version>
</dependency>

Building

This is a Maven project which you can build using

mvn clean install

Prerequisites for running tests

To use these providers you need to have R Project installed in your environment. After installing R, you need to install the R packages that the provider uses. The easiest way is to install them from CRAN.

Note that this section only describes the known prerequisites that are common to any model generated in R. Before importing a model you need to ensure that the required packages for that model are also installed.

Finally you must install Rserve.

Example in CentOS7:

Execute the following bash commands:

# repo that has R
yum -y install epel-release;

# needed for R dependencies
yum -y install libcurl-devel openssl-devel gsl-devel libwebp-devel librsvg2-devel R;

# start R
R

Execute the following R instructions:

# Load caret
install.packages("caret", dependencies=TRUE, repos = "http://cran.radicaldevelop.com/")

# Load all classification model implementations
# https://topepo.github.io/caret/available-models.html
# https://github.com/tobigithub/caret-machine-learning/wiki/caret-ml-setup
library(caret)
modNames <- unique(modelLookup()[modelLookup()\$forClass,c(1)])
install.packages(modNames, dependencies=TRUE, repos = "http://cran.radicaldevelop.com/")

# Load Rserve (needed for Pulse <-> R communication)
install.packages("Rserve", dependencies=TRUE, repos = "http://cran.radicaldevelop.com/"})

Docker

Feedzai has built a helpful docker image for testing, available on docker hub, that is being used in this repository's continuous integration. See the travis-ci configuration commands on how to use it.

com.feedzai

Feedzai

Versions

Version
0.4.0
0.3.2
0.3.1
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0