SlideShare a Scribd company logo
2
Most read
3
Most read
16
Most read
Introduction to
Presented by Diego Marinho de Oliveira
Short Version
Lead Data Scientist
Date: 2016-08-25
Julia Language for Data Science, Machine Learning, Statistics, Mathematics
Summary
Introduction
Interactive/Development Environments
Syntax
Libraries Highlights
Code Examples
Integration
Community
Important Events/Projects
Introduction
Julia is a high-level, high-performance dynamic programming language for technical computing
Adequate for Data Science, Research, Web application, scientific computer, among others
Multi-paradigm: multiple dispatch ("object-oriented"), procedural, functional, meta, multistaged
High-Performance JIT
Compiler
First appeared in 2012
Stable release
0.4.6 June 2016
Julia paper: http://arxiv.org/pdf/1411.1607v3.pdf
Introduction: Benchmarks
Source: http://julialang.org/benchmarks/
Introduction: How to Install Julia
Install Julia version 0.4.6 (last stable version)
Windows
https://s3.amazonaws.com/julialang/bin/winnt/x64/0.4/julia-0.4.6-win64.exe
Mac OS X
https://s3.amazonaws.com/julialang/bin/osx/x64/0.4/julia-0.4.6-
osx10.7+.dmg
Ubuntu
sudo add-apt-repository ppa:staticfloat/juliareleases
sudo add-apt-repository ppa:staticfloat/julia-deps
sudo apt-get update For more details check http://julialang.org/downloads/platform.html
Interaction/Development Environments
Julia Studio / Forio
Julia REPL
Kaggle Kernels
IJulia
JuliaBoxAtom
julia-vim
Syntax: Getting Started
Julia run code
Call Julia script
julia script.jl arg1 arg2…
Create a Julia command on the shell
julia -e 'for x in ARGS; println(X); end' foo bar
Create a Julia command using UTF-8 characters
echo 'println("Greetings! 你好! 안녕하세요?")' > ~/.juliarc.jl
Syntax: Variables
Example Variables
A variable
x = 10
Float variable
y = x + 2.0
UTF-8 variable
𝛔 = 1
Built-in Types
Int8, Int16, Int32, Int64,
Int12, UInt32, UInt64,
UInt128 103
Bool false, true
AbstractString “Data!”
Char ‘Z’
Float16, Float32, Float64
Complex 1 + 2im
Rational
5//6
Some math functions
round(Int, 76.0)
floor, ceil, trunc, eps, ...
div, rem, mod, gcd, lcm, ...
abs, sqrt, cbrt, exp, log, log2, ...
sin, cos, tan, cot, sec, hypot, ...
beta, gamma, eta, zeta, ...
Syntax: Strings
Types
AbstractString
UTF8String
ASCIIString
Char
Simple Usage Examples
Using a char
a = ‘A’
Simple string
b = ”for Data Science”
Interporlation
println(”Julia is $b”)
Regular Expression
match(r”(Ww+){,2}”, b)
Unicode usage
println(“u2200 x u2203 y”)
Triple Quote
json = ”””{
“Id”: 10232
}”””
Concat
“Lets” * “ code”
Repeat sentence
repeat(“Julia”, 10)
Syntax: Functions, Control Flow
Functions
Basic function definition
function f(x,y)
x + y
end
Terse function definition
f(x,y) = x+y
Optional and keywords args
x: optional; a: keyword
f(x, y=1; a=3) = 1
Control Flow
Compound expressions
Z = begin f(x,y)
x+ 1
x + y
end
Repeated eval loops
while x < 1
for x=1:10
Short-circuit evaluation
&&, ||
Conditional evaluations
If x < 10
x += 1
elseif 10 <= x < 12
x+= 2
else
x += 3
end
Exception Handling
try - catch
Tasks (coroutines)
yieldto
Syntax: Types, Parallel and Packages
Types
Abstract type
abstract Integer <: Real
Create a composite type
type Point
x::Float64
y::Float64
end
Parallel
Execute parallel command
nheads = @parallel (+) for i=1:200000000
Int(rand(Bool))
end
Packages
Show status
Pkg.status()
Install a new package
Pkg.add(“<Package Name>”)
Remove Package
Pkg.rm(“Package”)
Install from GitHub
Pkg.clone(“Package”)
Update packages
Pkg.update()
Library Highlights
● DataFrames.jl (data analysis)
● Gadfly.jl (data visualization)
● Vega.jl (data visualization)
● HypothesisTests.jl (statistics)
● XGBoost.jl (machine learning)
● GLM.jl (machine learning)
● Mocha.jl (machine learning/deep learning)
● Low Rank Models.jl (machine learning)
● JuMP.jl (optimization)
Code Examples
Simple Example Preprocess and Plot Data
Import Packages
using RDatasets,DataFrame, Gadfly
Load some data
mtcars = dataset("datasets", "mtcars")
Filter Models by Horse Power
mtcars = mtcars[mtcars[:HP] .> 100, :Model]
Plot
plot(mtcars, x=:Model, y=:HP, Geom.bar)
Integrations
Python: PyCall
Use math from Python
using PyCall
@pyimport math
math.sin(math.pi / 4) - sin(pi / 4)
Use Python
@pyimport matplotlib.pyplot as plt
x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x));
plt.plot(x, y, color="red", linewidth=2.0, linestyle="--")
plt.show()
Integrations
R: RCall
Community
Lang
S
Stats Opt Parallel DB
Quantum
Astro
GPU
Finance
Sparse
Math
...among others
Important Events/Projects

More Related Content

PPTX
Introduction to julia
ODP
Introduction to Shell script
PPTX
Core Java Tutorials by Mahika Tutorials
PPSX
Elements of Java Language
PPTX
Introduction to Node.js
PPTX
PHP Presentation
PPTX
JAVA PROGRAMMING
PPT
Java basic introduction
Introduction to julia
Introduction to Shell script
Core Java Tutorials by Mahika Tutorials
Elements of Java Language
Introduction to Node.js
PHP Presentation
JAVA PROGRAMMING
Java basic introduction

What's hot (20)

PPT
PPTX
Introduction to the Python
PPTX
PPTX
Introduction to Java -unit-1
PDF
Java 8 Workshop
PDF
Python programming : Files
PPTX
Introduction to Rust language programming
PPT
Php Presentation
PPT
Introduction to PHP
PPT
Clean Code summary
PDF
Installing Anaconda Distribution of Python
PDF
A Basic Django Introduction
PPT
Exception handling in java
PDF
Introduction to python programming
PPT
PHP - Introduction to Object Oriented Programming with PHP
PPT
Rust Programming Language
PPTX
Python-Libraries,Numpy,Pandas,Matplotlib.pptx
PDF
Basic Crud In Django
Introduction to the Python
Introduction to Java -unit-1
Java 8 Workshop
Python programming : Files
Introduction to Rust language programming
Php Presentation
Introduction to PHP
Clean Code summary
Installing Anaconda Distribution of Python
A Basic Django Introduction
Exception handling in java
Introduction to python programming
PHP - Introduction to Object Oriented Programming with PHP
Rust Programming Language
Python-Libraries,Numpy,Pandas,Matplotlib.pptx
Basic Crud In Django
Ad

Viewers also liked (16)

PDF
Julia language: inside the corporation
PDF
Data analysis with R and Julia
PDF
Ontologies in computer science and on the web
PPTX
Search Engine Optimization - Even the little guys can win...
PPTX
Startup Sorocaba: O que é o GBG Sorocaba?
PDF
DECENTRALIZED REVOLUTION. AMIN RAFIEE
PDF
Shared Services in Higher Education: conceps, clients, consumers and stakehol...
ODP
Planning Your Holiday Marketing Campaign
PDF
单反相机
PDF
MOLTO Annual Report 2011
PPTX
How To Be Happy During Pregnancy?
PDF
New Trends in Digital Health
PDF
How the Congressional Budget Office Uses Demographic Data
PPTX
Presentation on Remote sensing
PPTX
Expeditie mont blanc
PDF
קייס סטאדי מהירות אתר
Julia language: inside the corporation
Data analysis with R and Julia
Ontologies in computer science and on the web
Search Engine Optimization - Even the little guys can win...
Startup Sorocaba: O que é o GBG Sorocaba?
DECENTRALIZED REVOLUTION. AMIN RAFIEE
Shared Services in Higher Education: conceps, clients, consumers and stakehol...
Planning Your Holiday Marketing Campaign
单反相机
MOLTO Annual Report 2011
How To Be Happy During Pregnancy?
New Trends in Digital Health
How the Congressional Budget Office Uses Demographic Data
Presentation on Remote sensing
Expeditie mont blanc
קייס סטאדי מהירות אתר
Ad

Similar to Introduction to Julia Language (20)

PPTX
Framework engineering JCO 2011
PDF
A Future for R: Parallel and Distributed Processing in R for Everyone
ODP
Lambda Chops - Recipes for Simpler, More Expressive Code
PDF
Python_Fundamentals_for_Everyone_Usefull
PDF
Object-oriented Basics
PDF
Spark what's new what's coming
PDF
python-2021.pdf
PDF
From Java to Scala - advantages and possible risks
PDF
Do you know what your drupal is doing? Observe it!
PDF
From Legacy to Hexagonal (An Unexpected Android Journey)
PPTX
PPTX
PDF
Who killed object oriented design?
PDF
Data Structure and Algorithms (DSA) with Python
PPTX
Functional programming
PDF
Decoupling with Design Patterns and Symfony2 DIC
PDF
Scala @ TechMeetup Edinburgh
PDF
Programming IoT Gateways in JavaScript with macchina.io
Framework engineering JCO 2011
A Future for R: Parallel and Distributed Processing in R for Everyone
Lambda Chops - Recipes for Simpler, More Expressive Code
Python_Fundamentals_for_Everyone_Usefull
Object-oriented Basics
Spark what's new what's coming
python-2021.pdf
From Java to Scala - advantages and possible risks
Do you know what your drupal is doing? Observe it!
From Legacy to Hexagonal (An Unexpected Android Journey)
Who killed object oriented design?
Data Structure and Algorithms (DSA) with Python
Functional programming
Decoupling with Design Patterns and Symfony2 DIC
Scala @ TechMeetup Edinburgh
Programming IoT Gateways in JavaScript with macchina.io

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
A Presentation on Artificial Intelligence
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
Modernizing your data center with Dell and AMD
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity

Introduction to Julia Language

  • 1. Introduction to Presented by Diego Marinho de Oliveira Short Version Lead Data Scientist Date: 2016-08-25 Julia Language for Data Science, Machine Learning, Statistics, Mathematics
  • 3. Introduction Julia is a high-level, high-performance dynamic programming language for technical computing Adequate for Data Science, Research, Web application, scientific computer, among others Multi-paradigm: multiple dispatch ("object-oriented"), procedural, functional, meta, multistaged High-Performance JIT Compiler First appeared in 2012 Stable release 0.4.6 June 2016 Julia paper: http://arxiv.org/pdf/1411.1607v3.pdf
  • 5. Introduction: How to Install Julia Install Julia version 0.4.6 (last stable version) Windows https://s3.amazonaws.com/julialang/bin/winnt/x64/0.4/julia-0.4.6-win64.exe Mac OS X https://s3.amazonaws.com/julialang/bin/osx/x64/0.4/julia-0.4.6- osx10.7+.dmg Ubuntu sudo add-apt-repository ppa:staticfloat/juliareleases sudo add-apt-repository ppa:staticfloat/julia-deps sudo apt-get update For more details check http://julialang.org/downloads/platform.html
  • 6. Interaction/Development Environments Julia Studio / Forio Julia REPL Kaggle Kernels IJulia JuliaBoxAtom julia-vim
  • 7. Syntax: Getting Started Julia run code Call Julia script julia script.jl arg1 arg2… Create a Julia command on the shell julia -e 'for x in ARGS; println(X); end' foo bar Create a Julia command using UTF-8 characters echo 'println("Greetings! 你好! 안녕하세요?")' > ~/.juliarc.jl
  • 8. Syntax: Variables Example Variables A variable x = 10 Float variable y = x + 2.0 UTF-8 variable 𝛔 = 1 Built-in Types Int8, Int16, Int32, Int64, Int12, UInt32, UInt64, UInt128 103 Bool false, true AbstractString “Data!” Char ‘Z’ Float16, Float32, Float64 Complex 1 + 2im Rational 5//6 Some math functions round(Int, 76.0) floor, ceil, trunc, eps, ... div, rem, mod, gcd, lcm, ... abs, sqrt, cbrt, exp, log, log2, ... sin, cos, tan, cot, sec, hypot, ... beta, gamma, eta, zeta, ...
  • 9. Syntax: Strings Types AbstractString UTF8String ASCIIString Char Simple Usage Examples Using a char a = ‘A’ Simple string b = ”for Data Science” Interporlation println(”Julia is $b”) Regular Expression match(r”(Ww+){,2}”, b) Unicode usage println(“u2200 x u2203 y”) Triple Quote json = ”””{ “Id”: 10232 }””” Concat “Lets” * “ code” Repeat sentence repeat(“Julia”, 10)
  • 10. Syntax: Functions, Control Flow Functions Basic function definition function f(x,y) x + y end Terse function definition f(x,y) = x+y Optional and keywords args x: optional; a: keyword f(x, y=1; a=3) = 1 Control Flow Compound expressions Z = begin f(x,y) x+ 1 x + y end Repeated eval loops while x < 1 for x=1:10 Short-circuit evaluation &&, || Conditional evaluations If x < 10 x += 1 elseif 10 <= x < 12 x+= 2 else x += 3 end Exception Handling try - catch Tasks (coroutines) yieldto
  • 11. Syntax: Types, Parallel and Packages Types Abstract type abstract Integer <: Real Create a composite type type Point x::Float64 y::Float64 end Parallel Execute parallel command nheads = @parallel (+) for i=1:200000000 Int(rand(Bool)) end Packages Show status Pkg.status() Install a new package Pkg.add(“<Package Name>”) Remove Package Pkg.rm(“Package”) Install from GitHub Pkg.clone(“Package”) Update packages Pkg.update()
  • 12. Library Highlights ● DataFrames.jl (data analysis) ● Gadfly.jl (data visualization) ● Vega.jl (data visualization) ● HypothesisTests.jl (statistics) ● XGBoost.jl (machine learning) ● GLM.jl (machine learning) ● Mocha.jl (machine learning/deep learning) ● Low Rank Models.jl (machine learning) ● JuMP.jl (optimization)
  • 13. Code Examples Simple Example Preprocess and Plot Data Import Packages using RDatasets,DataFrame, Gadfly Load some data mtcars = dataset("datasets", "mtcars") Filter Models by Horse Power mtcars = mtcars[mtcars[:HP] .> 100, :Model] Plot plot(mtcars, x=:Model, y=:HP, Geom.bar)
  • 14. Integrations Python: PyCall Use math from Python using PyCall @pyimport math math.sin(math.pi / 4) - sin(pi / 4) Use Python @pyimport matplotlib.pyplot as plt x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x)); plt.plot(x, y, color="red", linewidth=2.0, linestyle="--") plt.show()
  • 16. Community Lang S Stats Opt Parallel DB Quantum Astro GPU Finance Sparse Math ...among others