This article describes how to create a Machine Learning Linear Discriminant Analysis output as shown below. The table below shows the Mean output of a linear discriminant analysis predicting brand preference based on the attributes of the Coke brand.
- A categorical Outcome variable to be predicted.
- At least two Predictor variables that will be considered as predictors of the outcome variable.
- In the Anything menu select Advanced Analysis > Machine Learning > Linear Discriminant Analysis.
- In the object inspector go to the Inputs tab.
- In the Outcome select the variable to be predicted.
- Select the predictor variable(s) in the Predictor(s) section.
- OPTIONAL: Select the desired Output type:
- Means: Produces a table showing the means by category, and assorted statistics to evaluate the LDA - as shown above.
- Detail: More detailed diagnostics, from the lda function in the R MASS package.
- Prediction-Accuracy Table: Produces a table relating the observed and predicted outcome. Also known as a confusion matrix.
- Scatterplot: A two-dimensional scatterplot of the group centroids in the space of the first two discriminant function variables.
- Moonplot: A two-dimensional moonplot, using the same assumptions as the scatterplot.
- OPTIONAL: Select the desired Missing Data treatment. (See Missing Data Options).
- OPTIONAL: Select Variable names to display variable names in the output instead of labels.
- OPTIONAL: Select the desired Prior probabilities to be used in case of computing the probabilities of the group membership of the Outcome. You can choose between:
- Equal: The prior probabilities are assumed to be equal for each Outcome group.
- Observed: Prior computed based on the current (weighted) group sizes. This is the default.