supervisedPRIM

Supervised classification learning and prediction using Patient Rules Induction Method

Installation

The stable release of the package is hosted on [CRAN](https://CRAN.R-project.org/package=supervisedPRIM and can be installed as usual:

install.packages("supervisedPRIM")

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

devtools::install_github("dashaub/supervisedPRIM")

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.

Usage

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

data(iris)
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.

License

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

Copy Link

Version

Down Chevron

Install

install.packages('supervisedPRIM')

Monthly Downloads

140

Version

2.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

October 1st, 2016

Functions in supervisedPRIM (2.0.0)