Book Image

Julia for Data Science

By : Anshul Joshi
2 (1)
Book Image

Julia for Data Science

2 (1)
By: Anshul Joshi

Overview of this book

Julia is a fast and high performing language that's perfectly suited to data science with a mature package ecosystem and is now feature complete. It is a good tool for a data science practitioner. There was a famous post at Harvard Business Review that Data Scientist is the sexiest job of the 21st century. (https://hbr.org/2012/10/data-scientist-the-sexiest-job-of-the-21st-century). This book will help you get familiarised with Julia's rich ecosystem, which is continuously evolving, allowing you to stay on top of your game. This book contains the essentials of data science and gives a high-level overview of advanced statistics and techniques. You will dive in and will work on generating insights by performing inferential statistics, and will reveal hidden patterns and trends using data mining. This has the practical coverage of statistics and machine learning. You will develop knowledge to build statistical models and machine learning systems in Julia with attractive visualizations. You will then delve into the world of Deep learning in Julia and will understand the framework, Mocha.jl with which you can create artificial neural networks and implement deep learning. This book addresses the challenges of real-world data science problems, including data cleaning, data preparation, inferential statistics, statistical modeling, building high-performance machine learning systems and creating effective visualizations using Julia.
Table of Contents (17 chapters)
Julia for Data Science
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Setting up the environment


Julia is available free. It can be downloaded from its website at the following address: http://julialang.org/downloads/. The website also has exhaustive documentation, examples, and links to tutorials and community. The documentation can be downloaded in popular formats.

Installing Julia (Linux)

Ubuntu/Linux Mint is one of the most famous Linux distros, and their deb packages of Julia are also provided. These are available for both 32-bit and 64-bit distributions.

To install Julia, add the PPA (personal package archive). Ubuntu users are privileged enough to have PPA. It is treated as an apt repository to build and publish Ubuntu source packages. In the terminal, type the following:

sudo apt-get add-repository ppa:staticfloat/juliareleases 
sudo apt-get update 

This adds the PPA and updates the package index in the repository.

Now install Julia:

sudo apt-get install Julia  

The installation is complete. To check if the installation is successful in the Terminal type in the following:

julia --version 

This gives the installed Julia's version.

To open the Julia's interactive shell, type julia into the Terminal. To uninstall Julia, simply use apt to remove it:

sudo apt-get remove julia 

For Fedora/RHEL/CentOS or distributions based on them, enable the EPEL repository for your distribution version. Then, click on the link provided. Enable Julia's repository using the following:

dnf copr enable nalimilan/julia

Or copy the relevant .repo file available as follows:

/etc/yum.repos.d/

Finally, in the Terminal type the following:

yum install julia

Installing Julia (Mac)

Users with Mac OS X need to click on the downloaded .dmg file to run the disk image. After that, drag the app icon into the Applications folder. It may prompt you to ask if you want to continue as the source has been downloaded from the Internet and so is not considered secure. Click on continue if it is downloaded for the Julia language official website.

Julia can also be installed using homebrew on the Mac as follows:

brew update 
brew tap staticfloat/julia 
brew install julia 

The installation is complete. To check if the installation is successful in the Terminal, type the following:

julia --version 

This gives you the installed Julia version.

Installing Julia (Windows)

Download the .exe file provided on the download page according to your system's configuration (32-bit/64-bit). Julia is installed on Windows by running the downloaded .exe file, which will extract Julia into a folder. Inside this folder is a batch file called julia.bat, which can be used to start the Julia console.

To uninstall, delete the Julia folder.

Exploring the source code

For enthusiasts, Julia's source code is available and users are encouraged to contribute by adding features or by bug fixing. This is the directory structure of the tree:

base/

Source code for Julia's standard library

contrib/

Editor support for Julia source, miscellaneous scripts

deps/

External dependencies

doc/manual

Source for the user manual

doc/stdlib

Source for standard library function help text

examples/

Example Julia programs

src/

Source for Julia language core

test/

Test suites

test/perf

Benchmark suites

ui/

Source for various frontends

usr/

Binaries and shared libraries loaded by Julia's standard libraries