Travis-CI Build Status Coverage Status CRAN version CRAN RStudio mirror downloads


Supervised classification learning and prediction using Patient Rules Induction Method


The stable release of the package is hosted on [CRAN]( and can be installed as usual:


The latest development version can be installed using the devtools package.


Version updates to CRAN will be published frequently after new features are implemented, so the development version is not recommended unless you plan to modify the code.


The supervisePRIM() function can be used to train a model on a dataset of all numeric columns with a binary 0/1 response. For example, using the famous iris dataset

yData <- ifelse(iris$Species == "setosa", 1L, 0L)
xData <- iris
xData$Species <- NULL
primModel <- supervisedPRIM(x = xData, y = yData)

This returns a S3 class supervisedPRIM object, and the regular S3 predict() generic can be used to apply the model to new data:

predictions <- predict(primModel, newdata = xData)

Furthermore, this supervisedPRIM objects also inherits from the “prim” package, so all the regular method there (e.g. plot()) can be used on the supervisedPRIM objects. Consult the documention of the “prim” package for more comprehensive details of the available functions and the arguments accepted for training.


This package is free software released under the GPL-3 license.