Linear discriminant analysis
Linear discriminant analysis is the algorithm that is used for classification tasks. This is often used to find the linear combination of the input features in the data, which can separate the observations into classes. In this case, it would be two classes; however, multi-class classification can also be done through the discriminant analysis algorithm, which is also called the multi-class linear discriminant analysis algorithm.
Getting ready
To get started with this recipe, you have to clone the DiscriminantAnalysis.jl
library from GitHub. This can be done by the following command:
Pkg.clone("https://github.com/trthatcher/DiscriminantAnalysis.jl.git")
And then, we can import the library by calling by its name, which is DiscriminantAnalysis
. This can be done as follows:
using DiscriminantAnalysis
We also have to use the DataFrames
library from Julia. If this library doesn't exist in your local system, it can be added by the following command:
Pkg...