Supervised classification learning and prediction using Patient Rules Induction Method
The stable release of the package is hosted on [CRAN](https://CRAN.R-project.org/package=supervisedPRIM 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.
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
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)
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.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.