Create the Best Train for Classification Models

Patterns searching and binary classification in economic and financial data is a large field of research. There are a large part of the data that the target variable is binary. Nowadays, many methodologies are used, this package collects most popular and compare different configuration options for Linear Models (LM), Generalized Linear Models (GLM), Linear Mixed Models (LMM), Discriminant Analysis (DA), Classification And Regression Trees (CART), Neural Networks (NN) and Support Vector Machines (SVM).

Linux/Mac Build Status Windows Build Status Coverage

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.


Install this package from CRAN (stable version):


Install this package from Github (development version):

For this, you can choose different packages such as:

With devtools
With remotes

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
## Create the model
creditscoring <- Optim.GLM(Y~., AustralianCredit, p = 0.7, seed=2018)
#See a ranking of the models tested
#Access to summary of the best model
#Do not sure of like the best model??, you can access to the all model, for example the 2nd model

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 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.


OptimClassifier 0.1.4

  • Added a vignette
  • Remove redundant options in Optim.CART function
  • Update Optim.LMM function, added more options
  • Added new S3 methods for plot and predict directly with models
  • Added a includedata option in training functions
  • Unified a criteria option in Optim.DA function
  • Added Issue report to DESCRIPTION
  • Added Travis-CI (Linux and Mac OS), and AppVeyor (Windows)
  • Added installation section and badges to

OptimClassifier 0.1.2

  • Fixed Optim.DA example
  • Removed history option in Optim.NN function for apply in the future training. This change occurs to fully align with CRAN policies.
  • Improve the different function helps

OptimClassifier 0.1.0

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.4 by Agustín Pérez-Torregrosa, a year ago

Report a bug at

Browse source code at

Authors: Agustín Pérez-Martín [aut] , Agustín Pérez-Torregrosa [cre, aut] , Marta Vaca-Lamata [aut] , Antonio José Verdú-Jover [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports crayon, dplyr, MASS, lme4, rpart, nnet, e1071, lmtest, nortest, clisymbols, ggplot2

Suggests testthat, knitr, rmarkdown

Depended on by RcmdrPlugin.OptimClassifier.

See at CRAN