The Patient Rule Induction Method (PRIM) is typically used for "bump hunting" data mining to identify regions with abnormally high concentrations of data with large or small values. This package extends this methodology so that it can be applied to binary classification problems and used for prediction.
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.
supervisedPRIM()to accept factors for