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 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.
The Discriminant Analysis module has the following algorithm and function settings:
Table 32.1. Discriminant Analysis: General Algorithm Settings
| Name | Description | Possible values | Default value |
|---|---|---|---|
| Automatic Data Transformations | if TRUE automatic transformations (e.g. replaceMissing, binarization) should be executed, false otherwise. | TRUE / FALSE | FALSE |
| Cost X | Misclassification cost for the 1st class | positive real number | 1 |
| Cost Y | Misclassification cost for the 2nd class | positive real number | 1 |
| Covariance Matrix Mode | Which covariance matrix to use | first / second / mean | first |
| Execute Init Tests | if TRUE initial data/task tests should be executed, false otherwise | TRUE / FALSE | TRUE |
| Liberal Execution Mode | if TRUE 'liberal' execution is preferred (do not stop on minor errors), false otherwise | TRUE / FALSE | TRUE |
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.
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 |
|---|---|---|
| probability | rank | returns the difference between the value of the linear discriminant function and the classification threshold for the n-th best category |
| probability | category | returns the probability of classifying as the given category |
| category | rank | returns the n-th best category |
| category | category | not supported |
| nodeID | rank | not supported |
| nodeID | category | not supported |