Optim.LM: Find out what is the transformation of the response variable...

Description Usage Arguments Value Examples

Description

Optim.LM is used to fit the best classification linear model to a dataset. For this purpose, we examine the variation of the precision using the root mean square error (RMSE) when transformations are applied on the response variable. In addition, several thresholds are applied to check which is the most optimal cut for the indicators derived from the confusion matrix (success rate, type I error and type II error) according to a given criterion.

Usage

1
2
3
Optim.LM(formula, data, p, seqthreshold = 0.05,
  criteria = c("success_rate", "error_ti", "error_tii"),
  includedata = FALSE, seed = NULL, ...)

Arguments

formula

A formula of the form y ~ x1 + x2 + ...

data

Data frame from which variables specified in formula are preferentially to be taken.

p

A percentage of training elements

seqthreshold

Linear models doesn't return a class, it returns probability because of he must cut by levels. This parameter allows you to select the percentage between one threshold and next evaluated.

criteria

This variable selects the criteria to select the best threshold. The default value is success_rate

includedata

logicals. If TRUE the training and testing datasets are returned.

seed

a single value, interpreted as an integer, or NULL. The default value is NULL, but for future checks of the model or models generated it is advisable to set a random seed to be able to reproduce it.

...

arguments passed to lm

Value

An object of class Optim. See Optim.object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if(interactive()){
## Load a Dataset
data(AustralianCredit)

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

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

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

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

OptimClassifier documentation built on Jan. 14, 2020, 5:10 p.m.