Usage

Data requirements

The data set for constructing a discriminant analysis model should contain numerical explanatory (i.e. active and obligatory) attributes and a binary target attribute. In order to use categorical explanatory variables it is necessary to transform them into binary zero-one dummy variables. Binarization can be performed before building the model or during building process by selecting the Automatic Data Trasformation option in General Algorithm Settings.

Missing values are not supported by the Discriminant Analysis Module unless the Automatic Data Trasformation option in General Algorithm Settings is selected. The other way to use a data set with missing values is to replace the missing data before building the model or to switch to Liberal Mode in algorithm settings to automatically omit observations containing missing values.

Model building and testing

Model building and testing is performed in the standard way. The complete procedure is described in the chapter AdvancedMiner in Practice (see Classification).

Full specification of the model settings contains the elements of General Algorithm Settings and Transformation Settings.

General Algorithm Settings

The Discriminant Analysis module has the following algorithm and function settings:

Table 32.1. Discriminant Analysis: General Algorithm Settings

NameDescriptionPossible valuesDefault value
Automatic Data Transformations if TRUE automatic transformations (e.g. replaceMissing, binarization) should be executed, false otherwise. TRUE / FALSEFALSE
Cost XMisclassification cost for the 1st classpositive real number1
Cost YMisclassification cost for the 2nd classpositive real number1
Covariance Matrix ModeWhich covariance matrix to usefirst / second / meanfirst
Execute Init Tests if TRUE initial data/task tests should be executed, false otherwise TRUE / FALSETRUE
Liberal Execution Mode if TRUE 'liberal' execution is preferred (do not stop on minor errors), false otherwise TRUE / FALSETRUE
Covariance Matrix Mode

The option first sets the covariance matrix from the first class, option second sets the matrix from the second class and the option mean uses the mean of both matrices.

In addition to the settings specific to the Discriminant algorithm, the user can use Transformation Settings - to control the way of data transformation; these settings are described in the Transformation chapter.

Model statistics

The Discriminant Analysis module does not provide any specialized model statistics, except the estimation of linear discriminant function coefficients.

Model application

The Discriminant Analysis module may be applied to classification problems. Classification is based on the estimated value of the linear discriminant function and is made by setting a threshold probability. An observation (vector of attributes) is assigned to one of two groups based on a comparison between the linear discriminant value estimated for this observation and the threshold probability (see also the example script below).

The Discriminant Analysis module is capable of creating two possible output types when classifying the provided data: category or probability. For details on how to apply the model to the data see the chapter Applying Models in AdvancedMiner, and the Classification subsection in the Applying for different mining functions section.

The table below presents the possible combinations and their descriptions.

Table 32.2. Discriminant Analysis module: output items and output types combinations

Output type Output Item Type Description
probabilityrank returns the difference between the value of the linear discriminant function and the classification threshold for the n-th best category
probabilitycategory returns the probability of classifying as the given category
categoryrankreturns the n-th best category
categorycategorynot supported
nodeIDranknot supported
nodeIDcategorynot supported