Book Image

Julia Cookbook

By : Raj R Jalem, Rohit
Book Image

Julia Cookbook

By: Raj R Jalem, Rohit

Overview of this book

Want to handle everything that Julia can throw at you and get the most of it every day? This practical guide to programming with Julia for performing numerical computation will make you more productive and able work with data more efficiently. The book starts with the main features of Julia to help you quickly refresh your knowledge of functions, modules, and arrays. We’ll also show you how to utilize the Julia language to identify, retrieve, and transform data sets so you can perform data analysis and data manipulation. Later on, you’ll see how to optimize data science programs with parallel computing and memory allocation. You’ll get familiar with the concepts of package development and networking to solve numerical problems using the Julia platform. This book includes recipes on identifying and classifying data science problems, data modelling, data analysis, data manipulation, meta-programming, multidimensional arrays, and parallel computing. By the end of the book, you will acquire the skills to work more effectively with your data.
Table of Contents (7 chapters)

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.add("DataFrames...