Learn R Programming

OptimClassifier

OptimClassifier provides a set of tools for creating models, selecting the best parameters combination for a model, and select the best threshold for your binary classification. The package contains tools for:

  • Linear Model (LM)
  • Generalized Linear Model (GLM)
  • Linear Mixed Model (LMM)
  • Classification And Regression Tree (CART)
  • Discriminant Analysis (DA)
  • Neural Networks (NN)
  • Support Vector Machines (SVM)

as well as others that will be implemented in the future.

Installation

Install this package from CRAN (stable version):

install.packages("OptimClassifier")

Install this package from Github (development version):

For this, you can choose different packages such as:

With devtools
library(devtools)
install_github("economistgame/OptimClassifier")
With remotes
library(remotes)
install_github("economistgame/OptimClassifier")

A simple example

This is a basic example which shows you how to solve a common credit scoring problem with this package:

## Load a Dataset
data(AustralianCredit)

## Create the model
creditscoring <- Optim.GLM(Y~., AustralianCredit, p = 0.7, seed=2018)

#See a ranking of the models tested
print(creditscoring)

#Access to summary of the best model
summary(creditscoring)

#Do not sure of like the best model??, you can access to the all model, for example the 2nd model
summary(creditscoring,2)
 

Bugs and feature requests

If you find problems with the package, or there's anything that it doesn't do which you think it should, please submit them to https://github.com/economistgame/OptimClassifier/issues. In particular, let me know about optimizers and formats which you'd like supported, or if you have a workflow which might make sense for inclusion as a default convenience function.

Copy Link

Version

Install

install.packages('OptimClassifier')

Monthly Downloads

46

Version

0.1.5

License

GPL (>= 2)

Last Published

January 14th, 2020

Functions in OptimClassifier (0.1.5)

print.Optim

Print an Optim Object
RMSE

Root Mean Square Error
Optim.object

Optimized Classifier Object
sampler

Splitting your dataset in training and testing
MC

Confusion Matrix
Optim.CART

Tune CART for the optimal complexity parameter
Optim.GLM

Find out what is the error distribution and link function that best fits a classification generalized linear model to your data
Optim.SVM

Discover the best SVM for your data
Optim.LM

Find out what is the transformation of the response variable that best fits a classification linear model to your data
Optim.DA

Discover the best Discriminant Analysis for your data
AustralianCredit

A Credit Approval Dataset
Optim.NN

Discover the best Neural Network for your data
Optim.LMM

Discover what is the best random variable for your data set
Microsoft

Daily Information Data of Microsoft