Dr. Chris Musselle – Consultant R Meets Julia Dr Chris Musselle.

Slides:



Advertisements
Similar presentations
MatLab API in C++ Christopher Dabney. Purpose MatLab … MatLab … is an interpreted scripting language is an interpreted scripting language conversion to.
Advertisements

Introduction to the CUDA Platform
MATLAB MATLAB is a high-level technical computing language and
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
MATLAB Presented By: Nathalie Tacconi Presented By: Nathalie Tacconi Originally Prepared By: Sheridan Saint-Michel Originally Prepared By: Sheridan Saint-Michel.
Data Analytics and Dynamic Languages Lee E. Edlefsen, Ph.D. VP of Engineering 1.
Reasons to study concepts of PL
F# Shiva Srivastava David He Peter Bingel. Overview F# (pronounced "F sharp") is a functional and object oriented programming language for the Microsoft.NET.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
Language Issues Misunderstimated? Sublimable? Hopefuller? "I know how hard it is for you to put food on your family.” "I know the human being and fish.
What is R Muhammad Omer. What is R  R is the programing language software for statistical computing and data analysis  The R language is extensively.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Unit Six Assignment 1 Chris Boardley.
(Edit via Slide Master) Name – Job Title From R to Python Robert Mastrodomenico Global Sports Statistics.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Alan Edelman, Jeff Bezanson Viral Shah, Stefan Karpinski Jeremy Kepner and the vibrant open-source community Computer Science & AI Laboratories Novel Algebras.
What is R By: Wase Siddiqui. Introduction R is a programming language which is used for statistical computing and graphics. “R is a language and environment.
Julia A fast dynamic language for technical computing Tim Besard
Ch 1. Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
Groovy WHAT IS IT? HOW DOES IT WORK? IS IT USEFUL?
CS 355 – Programming Languages
CS223 Algorithms D-Term 2013 Instructor: Mohamed Eltabakh WPI, CS Introduction Slide 1.
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
Introduction to Julia: Why are we doing this to you? (Fall 2015) Steven G. Johnson, MIT Applied Math MIT classes , 18.06, ,
Programming Languages: Scratch Intro to Scratch. Lower level versus high level Clearly, lower level languages can be tedious Higher level languages quickly.
MathCore Engineering AB Experts in Modeling & Simulation WTC.
Scientific Computing Beyond Matlab Nov 19, 2012 Jason Su.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Computational Physics Introduction 3/30/11. Goals  Calculate solutions to physics problems  All physics problems can be formulated mathematically. 
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
C++ Panel Discussion Summary Jim Kowalkowski. Participants Amber Boehnlein Jim Kowalkowski Leo Michelotti Marc Paterno Liz Sexton-Kennedy Bjarne Stroustrup.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Programming language. Definition Programming language is a formal language designed to communicate instructions to a computer. Programming languages can.
PROGRAMMING LANGUAGES FOR WHEN USING QUANT ANALYSIS FOR HIGH FREQUENCY TRADING.
Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Ch 1. A Python Q&A Session. Why do people use Python? Software Quality Developer productivity Program portability Support Libraries Component integration.
CIS 601 Fall 2003 Introduction to MATLAB Longin Jan Latecki Based on the lectures of Rolf Lakaemper and David Young.
Efficient Geophysical Research in Julia
Mantid: A new approach to data analysis at large scale facilities Jon Taylor Project WIKI (Binary downloads)
CIS 595 MATLAB First Impressions. MATLAB This introduction will give Some basic ideas Main advantages and drawbacks compared to other languages.
PYTHON FOR HIGH PERFORMANCE COMPUTING. OUTLINE  Compiling for performance  Native ways for performance  Generator  Examples.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Introduction to Data Analysis with R on HPC Texas Advanced Computing Center Feb
Visual Linker ADD presentation. slide 2  Project Overview And Vision  Project System View  The System Life Cycle  Data Model and.
Python Scripting for Computational Science CPS 5401 Fall 2014 Shirley Moore, Instructor October 6,
S5.40. Module Structure 30% practical tests / 70% written exam 3h lectures / week (except reading week) 3 x 2h of computer labs (solving problems practicing.
Programming vs. Packaged
CST 1101 Problem Solving Using Computers
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
Why study programming languages?
Compiler Construction (CS-636)
Software for scientific calculations
CS101 Introduction to Computing Lecture 19 Programming Languages
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Programming vs. Packaged
Introduction to MATLAB
Python for Scientific Computing
Deep Learning Packages
CS 179 Project Intro.
Brief Intro to Python for Statistics
MPJ: A Java-based Parallel Computing System
Simulation And Modeling
Python for Data Analysis
Reasons To Study Programming Languages
Igor Stančin, Alan Jović to: {igor.stancin,
Presentation transcript:

Dr. Chris Musselle – Consultant R Meets Julia Dr Chris Musselle

Dr. Chris Musselle – Consultant Outline Julia – What, So What, When? Julia – Where its currently at Julia and R Case Study: Calculating String Similarity

Dr. Chris Musselle – Consultant - julialang.org A flexible dynamic language appropriate for scientific and numerical computing. Arrived Feb 2012 after 2 years development at MIT. Julia released Aug Free and open source (MIT Licensed)

Dr. Chris Musselle – Consultant Language Features Performance comparable to compiled languages. Designed with distributed computing in mind. Dynamic typing, optional declaration, Multiple dispatch. Libs written in Julia, git based package management. Direct calling of C and Fortran libraries. Interactive REPL “Read-Eval-Print-Loop”

Dr. Chris Musselle – Consultant The Vision “We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as MATLAB, as good at gluing programs together as the shell. … something that provides the distributed power of Hadoop - without the kilobytes of boilerplate Java and XML” --- Julia’s Authors Source:

Dr. Chris Musselle – Consultant Too Good to be True? Scientific computing, though requiring high performance, have shifted to use dynamic languages. More productive. Human time for expensive than CPU time. Many advancements in compiler techniques and language design over the years e.g. JIT. Can now greatly mitigate the performance trade-off associated with a dynamic language. But has required building from the ground up.

Dr. Chris Musselle – Consultant So How Fast is Fast? Source:

Dr. Chris Musselle – Consultant Where’s Julia at now? Standard Library Core Syntax, Collections and Data Structures Linear Algebra, BLAS, Sparse Matrices Package Manager Graphics Unit and Functional Testing Profiling External Packages Total of 384 external packages written by 138 primary authors.

Dr. Chris Musselle – Consultant Who Uses it? JuliaLang – The Core language JuliaStats – Statistics JuliaOpt – Numerical Optimization Library JuliaSparse – Sparse Matrix Solvers JuliaDiff – Differentiation Tools JuliaWeb – Web stack tools JuliaGPU – GPU computing JuliaQuant – Financial Analysis Libraries JuliaAstro / JuliaQuantum – Astronomy/Physics/Chemistry

Dr. Chris Musselle – Consultant When to Use it? Julia allows fast prototyping of code, that is also fast to execute. Best used to code up bespoke algorithms. Julia ecosystem is in its infancy, majority of packages focus on numerical computation. May need to re-implement ‘tools’ from scratch e.g. parsers / data structures / algorithms etc.

Dr. Chris Musselle – Consultant Julia and R? Calling R from Julia: Calling Julia from R: System calls – New session each time

Dr. Chris Musselle – Consultant Case Study: String Similarity (Edit Distance) The number of “edit” operations between two strings where an edit is: An insertion A deletion A substitution E.g. Edits between sitting and Kitten Substitute “ s ” for “ k ” at position 1 Substitute “ i ” for “ e ” at position 5 Insert “ g ” at position 6

Dr. Chris Musselle – Consultant Case Study: String Similarity (Edit Distance) This particular formulation is known as the Levenshtein Distance. Used the optimised “dynamic programing” approach. Pseudocode available at Applications Spell checking Computational Biology Natural Language Processing Speech Recognition

Dr. Chris Musselle – Consultant Case Study: String Similarity (Edit Distance) Compared 5 different approaches: R_lev - Written purely in R. R_adist - Using the built in adist function in R Julia – Written purely in Julia Python_np_lev – Written in Python (using numpy) Python_c_lev – Python wrapper to a C function

Dr. Chris Musselle – Consultant Results

Dr. Chris Musselle – Consultant Results (minus R lev)

Dr. Chris Musselle – Consultant Key Results Pure R implementation was over 10 times slower that adist and Python and 33 time slower than Julia. Found Julia 2.5 to 3 times faster than Python and R Reading line by line <<< Reading in all at once Python + numpy ~ R’s built in adist

Dr. Chris Musselle – Consultant Summary Julia – Certainly has great potential Strengths – numerical computation in a dynamic “REPL” language with clean syntax Weakness’s – Playing catch-up with tools and libraries. Early days for integration with other languages. Julia  Other language good though. Don’t prototype your next algorithm in R if speed matters! Found Julia 2.5 to 3 times faster than Python and R

Dr. Chris Musselle – Consultant Thank You For Your Attention Any Questions? - julialang.org Calling R from Julia: Calling Julia from R: Edit distance:

Dr. Chris Musselle – Consultant What’s Next? Accepted GSoC projects 2014 Libgit2 support Linear algebra for generic types Julia + Light Table – IDE development IJulia Interactive Widgets 3D Visualization Package for Julia