Optim.DA: Discover the best Discriminant Analysis for your data

Description Usage Arguments Details Value Examples

Description

This function search the best Discriminant Analysis (DA) between LDA and QDA.

Usage

1
2
Optim.DA(formula, data, p, criteria = c("rmse", "success_rate",
  "ti_error", "tii_error"), 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

criteria

Select criterion to use.

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 lda and qda

Details

LDA and QDA are distribution-based classifiers with the assumption that data follows a multivariate normal distribution. LDA differs from QDA in the assumption about the class variability. LDA assumes that all classes share the same within-class covariance matrix whereas QDA allows for distinct within-class covariance matrices.

Value

An object of class Optim. See Optim.object

Examples

1
2
3
4
5
6
7
if(interactive()){
## Load a Dataset
data(AustralianCredit)
## Generate a Model
modelFit <- Optim.DA(Y~., AustralianCredit, p = 0.7, seed=2018)
modelFit
}

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