Julia: a Modern Language for Modern ML

Total Page:16

File Type:pdf, Size:1020Kb

Julia: a Modern Language for Modern ML Julia: A modern language for modern ML Dr. Viral Shah and Dr. Simon Byrne www.juliacomputing.com What we do: Modernize Technical Computing Today’s technical computing landscape: • Develop new learning algorithms • Run them in parallel on large datasets • Leverage accelerators like GPUs, Xeon Phis • Embed into intelligent products “Business as usual” will simply not do! General Micro-benchmarks: Julia performs almost as fast as C • 10X faster than Python • 100X faster than R & MATLAB Performance benchmark relative to C. A value of 1 means as fast as C. Lower values are better. A real application: Gillespie simulations in systems biology 745x faster than R • Gillespie simulations are used in the field of drug discovery. • Also used for simulations of epidemiological models to study disease propagation • Julia package (Gillespie.jl) is the state of the art in Gillespie simulations • https://github.com/openjournals/joss- papers/blob/master/joss.00042/10.21105.joss.00042.pdf Implementation Time per simulation (ms) R (GillespieSSA) 894.25 R (handcoded) 1087.94 Rcpp (handcoded) 1.31 Julia (Gillespie.jl) 3.99 Julia (Gillespie.jl, passing object) 1.78 Julia (handcoded) 1.2 Those who convert ideas to products fastest will win Computer Quants develop Scientists prepare algorithms The last 25 years for production (Python, R, SAS, DEPLOY (C++, C#, Java) Matlab) Quants and Computer Compress the Scientists DEPLOY innovation cycle collaborate on one platform - JULIA with Julia Julia offers competitive advantages to its users Julia is poised to become one of the Thank you for Julia. Yo u ' v e k i n d l ed leading tools deployed by developers serious excitement. I am now working and programmers at banks, hedge funds, toward replacing some of our regulators and vendors computationally intensive Matlab tools with Julia. Anthony Malakian, Waters Technology Magazine Patrick Majors, Engineering Manager, Cooper Tires Research anchored at MIT The Julia community: 225,000 users Expecting to reach 1 million users and 10,000 enterprises by 2019 JuliaCon 2016: 50 talks and 250 attendees Traction across Industries FINANCE ENGINEERING IOT 3D PRINTING Economic Air Collision Self-driving Cars 3D Printing Models at the NY Avoidance for at UC Berkeley Quadcopters at Fed FAA Voxel8 Machine Learning Machine Learning: Write once, Run everywhere Many machine learning frameworks Run on hardware of your choice Mocha.jl Merlin.jl Knet.jl Machine Learning to build a sky atlas on 8000 cores at NERSC Netflix recommendation challenge: Faster than Spark • RecSys.jl - Large movie data set (500 million parameters) • Distributed Alternating Least Squares SVD- based model executed in Julia and in Spark • Faster: • Original code in Scala • Distributed Julia nearly 2x faster than Spark • Better: • Julia code is significantly more readable • Easy to maintain and update http://juliacomputing.com/blog/2016/04/22/a-parallel-recommendation-engine-in-julia.html High performance Microrheology at Path Bio Analytics Analytics for Personalized Medicine • Improving the Quantity and Quality of Information via Microrheology-Based Analytics • Camera-based real-time particle tracking at KHz rates and Angstrom accuracy • Real-time organoid analysis leading to precision medicine. • Julia was the only system that allowed for real-time analysis of instrumentation data Deep learning for diabetic retinopathy detection http://juliacomputing.com/blog/2016/11/16/deep-eyes.html Normal Eye Fundus Eye Fundus Infected with Diabetic Retinopathy Neural style transfer • Deep learning model with MXNet • Performance AND expressivity • Easy to experiment • Training on the CPU and GPU • Explore pre-trained models Finance Solvency II Actuarial Capital Modeling • Purpose of their Calculation Kernel • Calculation of a Solvency II Balance Sheet • Particularly focuses on the Solvency Capital Requirement • Use of Monte Carlo Simulation, currently up to 500,000 scenarios • Involves aggregation (summing up legal entities to a Group), ranking and smoothing • Generates various outputs for downstream reporting “Solvency II compliant models in Julia are 1000x faster than IBM Algorithmics, 10x lesser code and took 1/10 the time to implement” – Tim Thornham, Director of Financial Solutions Modeling Economic Scenario Generator • High-dimensional data set on which data extraction, data reordering, and various statistical kernel computations are performed • Faster: – Original code was in K – Julia code is 4x-10x faster • Better: – Julia code is significantly more readable – Easy to maintain and update – Cost-effective Mathematical Optimization • Solving a large complex mathematical optimization problem for mortgages • Full optimization: (Faster Speed + Better Quality) – MATLAB 2014a 558.094600 seconds, 3110 iterations – Julia v0.4 1.833 seconds, 50 iterations (300x faster) • Performance: Objective function only (100 iterations) – MATLAB 2014a 2.69 seconds – Julia v0.4 0.78 seconds (3.5x faster) • Quality: Optimization value (11-parameter) – MATLAB 2014a 4.277644613116166e+14 (3110 iterations) – Julia v0.4 4.270887086707642e+14 (50 iterations) Risk Analytics and Asset Management • BlackRock is using Julia in its flagship Aladdin product: – Next generation analytics – Risk management – Asset management – Time series analytics • Significant gain in productivity and scalability Asset and Liabilities Modeling at Brazilian Development Bank • Manage >$1 Trillion in assets • Multistage stochastic optimization solution to the bank’s returns “Selected Julia for its speed, elegance, – Choosing the best allocation, funding and JuMP – the Julia Mathematical and hedge decisions Optimization Package” - Felipe Tavares – Subject to a wide range of business, political and market restrictions Mathematical Optimization Solver capabilities accessible through JuMP Solver L MILP SOC MISOC SDP NLP MINL Other JuMP P P P P Bonmin MathProgBase.jl (via ✔ ✔ ✔ ✔ AmplNLwriter.jl) Cbc.jl Clp.jl CPLEX.jl Cbc (.jl) ✔ ✔ ECOS.jl GLPK.jl Gurobi.jl Clp (.jl) ✔ Couenne Ipopt.jl KNITRO.jl Mosek.jl (via ✔ ✔ ✔ ✔ ApmlNLWriter.jl) NLopt.jl SCS.jl IP CPLEX (.jl) ✔ ✔ ✔ ✔ callbacks Key: LP = Linear Programming ECOS (.jl) ✔ ✔ MILP = Mixed Integer Linear Programming SOCP = Second-order cone programming IP (includes convex QP and QCQP) GLPK (.jl) ✔ ✔ callbacks MISOCP = Mixed Integer SOCP SDP = Semidefinite Programming IP NLP = (constrained) Nonlinear Programming Gurobi (.jl) ✔ ✔ ✔ ✔ callbacks (includes general QP and QCQP) MINLP = Mixed Integer NLP Ipopt (.jl) ✔ ✔ Notes: Artelys Knitro (.jl) ✔ ✔ ✔ ✔ 1. Problem must be convex. Mosek (.jl) ✔ ✔ ✔ ✔ ✔ ✔1 NLopt (.jl) ✔ SCS (.jl) ✔ ✔ ✔ Some JuMP Applications • Train scheduling • Self-driving cars • Electric vehicle charging • Power grid control • Plasma physics • Fantasy sports If you have a choice of several languages, it is, all other things being equal, a mistake to program in anything but the most powerful one. Paul Graham in Beating the Averages Co-Founder, Y-Combinator www.juliacomputing.com Simplicity meets Speed Products that make Julia easy to use, easy to deploy and easy to scale Simon Byrne - Julia Computing What is Julia? Julia is a modern, high-performance, dynamic programming language for technical computing. modern: based on the lessons of the past 60 years high-performance: as fast as traditional "fast" languages (Fortran/C/C++) dynamic: "simple to use" (R/Matlab/Python) technical computing: anything involving numbers Why Julia? To write fast, efficient code in an easy, elegant dynamic language Avoids the two language problem: My R/Python/Matlab code is too slow; I need to rewrite low-level routines in C/C++/Fortran It is easy to "peek under the hood" Most of Julia is written Julia Can inspect various stages of the compilation process It's free (download at www.julialang.org) It's fun. Play nicely with existing tools In [1]: # accurately compute log(sum(exp(X))) function logsumexp(X) u = maximum(X) t = 0.0 for i = 1:length(X) t += exp(X[i]-u) end u + log(t) end Out[1]: logsumexp (generic function with 1 method) Syntax heavily influenced by Python and Matlab Basic differences from Python: explicit end vs. significant whitespace 1-based vs. 0-based arrays Basic differences from Matlab: Functions can be defined anywhere Scalars are not matrices in disguise randn(10) gives you the thing you actually want. Types Every object has one: In [2]: typeof(1.0) Out[2]: Float64 In [3]: typeof(logsumexp) Out[3]: #logsumexp In [4]: typeof(Float64) Out[4]: DataType New types are declared with the type keyword: In [5]: type Baz a::Float64 b::Float64 end In [6]: b = Baz(1.0,2.0) Out[6]: Baz(1.0,2.0) Unlike classes in Python/Matlab, user defined types are just as efficient as the builtin types (indeed, most "builtin" types are actually written in Julia) Generic functions and multiple dispatch Julia functions are generic in that different code paths can be called depending on the type arguments. In [7]: f(x::Float64) = "$x is a float" # "$" does string substitution f(x::Int) = "$x is an integer" Out[7]: f (generic function with 2 methods) f(...) = ... is the same as function f(...) ... end :: is an optional type specification. In [8]: f(1.0) Out[8]: "1.0 is a float" In [9]: f(1) Out[9]: "1 is an integer" Unlike traditional object oriented languages (C++, Python, Matlab), functions don't "belong" to a type. This allows for multiple dispatch on any combination of arguments. In [10]: f(x::Float64,y::Int) = "$x is a float, but $y is an integer" f(x::Real,y::Real) = "$x and $y are both some sort of real" # Real is an abstrac t "super" type f(x,y)
Recommended publications
  • Neural Networks (AI) (WBAI028-05) Lecture Notes
    Herbert Jaeger Neural Networks (AI) (WBAI028-05) Lecture Notes V 1.5, May 16, 2021 (revision of Section 8) BSc program in Artificial Intelligence Rijksuniversiteit Groningen, Bernoulli Institute Contents 1 A very fast rehearsal of machine learning basics 7 1.1 Training data. .............................. 8 1.2 Training objectives. ........................... 9 1.3 The overfitting problem. ........................ 11 1.4 How to tune model flexibility ..................... 17 1.5 How to estimate the risk of a model .................. 21 2 Feedforward networks in machine learning 24 2.1 The Perceptron ............................. 24 2.2 Multi-layer perceptrons ......................... 29 2.3 A glimpse at deep learning ....................... 52 3 A short visit in the wonderland of dynamical systems 56 3.1 What is a “dynamical system”? .................... 58 3.2 The zoo of standard finite-state discrete-time dynamical systems .. 64 3.3 Attractors, Bifurcation, Chaos ..................... 78 3.4 So far, so good ... ............................ 96 4 Recurrent neural networks in deep learning 98 4.1 Supervised training of RNNs in temporal tasks ............ 99 4.2 Backpropagation through time ..................... 107 4.3 LSTM networks ............................. 112 5 Hopfield networks 118 5.1 An energy-based associative memory ................. 121 5.2 HN: formal model ............................ 124 5.3 Geometry of the HN state space .................... 126 5.4 Training a HN .............................. 127 5.5 Limitations ..............................
    [Show full text]
  • Introduction to IDL®
    Introduction to IDL® Revised for Print March, 2016 ©2016 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation. All rights reserved. ENVI and IDL are registered trademarks of Harris Corporation. All other marks are the property of their respective owners. This document is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Contents 1 Introduction To IDL 5 1.1 Introduction . .5 1.1.1 What is ENVI? . .5 1.1.2 ENVI + IDL, ENVI, and IDL . .6 1.1.3 ENVI Resources . .6 1.1.4 Contacting Harris Geospatial Solutions . .6 1.1.5 Tutorials . .6 1.1.6 Training . .7 1.1.7 ENVI Support . .7 1.1.8 Contacting Technical Support . .7 1.1.9 Website . .7 1.1.10 IDL Newsgroup . .7 2 About This Course 9 2.1 Manual Organization . .9 2.1.1 Programming Style . .9 2.2 The Course Files . 11 2.2.1 Installing the Course Files . 11 2.3 Starting IDL . 11 2.3.1 Windows . 11 2.3.2 Max OS X . 11 2.3.3 Linux . 12 3 A Tour of IDL 13 3.1 Overview . 13 3.2 Scalars and Arrays . 13 3.3 Reading Data from Files . 15 3.4 Line Plots . 15 3.5 Surface Plots . 17 3.6 Contour Plots . 18 3.7 Displaying Images . 19 3.8 Exercises . 21 3.9 References . 21 4 IDL Basics 23 4.1 IDL Directory Structure . 23 4.2 The IDL Workbench . 24 4.3 Exploring the IDL Workbench .
    [Show full text]
  • A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya 1 Introduction
    A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya Sai K. Popuri and Matthias K. Gobbert* Department of Mathematics and Statistics, University of Maryland, Baltimore County *Corresponding author: [email protected], www.umbc.edu/~gobbert Technical Report HPCF{2017{3, hpcf.umbc.edu > Publications Abstract Matlab is the most popular commercial package for numerical computations in mathematics, statistics, the sciences, engineering, and other fields. Octave is a freely available software used for numerical computing. R is a popular open source freely available software often used for statistical analysis and computing. Julia is a recent open source freely available high-level programming language with a sophisticated com- piler for high-performance numerical and statistical computing. They are all available to download on the Linux, Windows, and Mac OS X operating systems. We investigate whether the three freely available software are viable alternatives to Matlab for uses in research and teaching. We compare the results on part of the equipment of the cluster maya in the UMBC High Performance Computing Facility. The equipment has 72 nodes, each with two Intel E5-2650v2 Ivy Bridge (2.6 GHz, 20 MB cache) proces- sors with 8 cores per CPU, for a total of 16 cores per node. All nodes have 64 GB of main memory and are connected by a quad-data rate InfiniBand interconnect. The tests focused on usability lead us to conclude that Octave is the most compatible with Matlab, since it uses the same syntax and has the native capability of running m-files. R was hampered by somewhat different syntax or function names and some missing functions.
    [Show full text]
  • Metaobject Protocols: Why We Want Them and What Else They Can Do
    Metaobject protocols: Why we want them and what else they can do Gregor Kiczales, J.Michael Ashley, Luis Rodriguez, Amin Vahdat, and Daniel G. Bobrow Published in A. Paepcke, editor, Object-Oriented Programming: The CLOS Perspective, pages 101 ¾ 118. The MIT Press, Cambridge, MA, 1993. © Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. Metaob ject Proto cols WhyWeWant Them and What Else They Can Do App ears in Object OrientedProgramming: The CLOS Perspective c Copyright 1993 MIT Press Gregor Kiczales, J. Michael Ashley, Luis Ro driguez, Amin Vahdat and Daniel G. Bobrow Original ly conceivedasaneat idea that could help solve problems in the design and implementation of CLOS, the metaobject protocol framework now appears to have applicability to a wide range of problems that come up in high-level languages. This chapter sketches this wider potential, by drawing an analogy to ordinary language design, by presenting some early design principles, and by presenting an overview of three new metaobject protcols we have designed that, respectively, control the semantics of Scheme, the compilation of Scheme, and the static paral lelization of Scheme programs. Intro duction The CLOS Metaob ject Proto col MOP was motivated by the tension b etween, what at the time, seemed liketwo con icting desires. The rst was to have a relatively small but p owerful language for doing ob ject-oriented programming in Lisp. The second was to satisfy what seemed to b e a large numb er of user demands, including: compatibility with previous languages, p erformance compara- ble to or b etter than previous implementations and extensibility to allow further exp erimentation with ob ject-oriented concepts see Chapter 2 for examples of directions in which ob ject-oriented techniques might b e pushed.
    [Show full text]
  • Julia, My New Friend for Computing and Optimization? Pierre Haessig, Lilian Besson
    Julia, my new friend for computing and optimization? Pierre Haessig, Lilian Besson To cite this version: Pierre Haessig, Lilian Besson. Julia, my new friend for computing and optimization?. Master. France. 2018. cel-01830248 HAL Id: cel-01830248 https://hal.archives-ouvertes.fr/cel-01830248 Submitted on 4 Jul 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 1 « Julia, my New frieNd for computiNg aNd optimizatioN? » Intro to the Julia programming language, for MATLAB users Date: 14th of June 2018 Who: Lilian Besson & Pierre Haessig (SCEE & AUT team @ IETR / CentraleSupélec campus Rennes) « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 2 AgeNda for today [30 miN] 1. What is Julia? [5 miN] 2. ComparisoN with MATLAB [5 miN] 3. Two examples of problems solved Julia [5 miN] 4. LoNger ex. oN optimizatioN with JuMP [13miN] 5. LiNks for more iNformatioN ? [2 miN] « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 3 1. What is Julia ? Open-source and free programming language (MIT license) Developed since 2012 (creators: MIT researchers) Growing popularity worldwide, in research, data science, finance etc… Multi-platform: Windows, Mac OS X, GNU/Linux..
    [Show full text]
  • Predrnn: Recurrent Neural Networks for Predictive Learning Using Spatiotemporal Lstms
    PredRNN: Recurrent Neural Networks for Predictive Learning using Spatiotemporal LSTMs Yunbo Wang Mingsheng Long∗ School of Software School of Software Tsinghua University Tsinghua University [email protected] [email protected] Jianmin Wang Zhifeng Gao Philip S. Yu School of Software School of Software School of Software Tsinghua University Tsinghua University Tsinghua University [email protected] [email protected] [email protected] Abstract The predictive learning of spatiotemporal sequences aims to generate future images by learning from the historical frames, where spatial appearances and temporal vari- ations are two crucial structures. This paper models these structures by presenting a predictive recurrent neural network (PredRNN). This architecture is enlightened by the idea that spatiotemporal predictive learning should memorize both spatial ap- pearances and temporal variations in a unified memory pool. Concretely, memory states are no longer constrained inside each LSTM unit. Instead, they are allowed to zigzag in two directions: across stacked RNN layers vertically and through all RNN states horizontally. The core of this network is a new Spatiotemporal LSTM (ST-LSTM) unit that extracts and memorizes spatial and temporal representations simultaneously. PredRNN achieves the state-of-the-art prediction performance on three video prediction datasets and is a more general framework, that can be easily extended to other predictive learning tasks by integrating with other architectures. 1 Introduction
    [Show full text]
  • Alternatives to Python: Julia
    Crossing Language Barriers with , SciPy, and thon Steven G. Johnson MIT Applied Mathemacs Where I’m coming from… [ google “Steven Johnson MIT” ] Computaonal soPware you may know… … mainly C/C++ libraries & soPware … Nanophotonics … oPen with Python interfaces … (& Matlab & Scheme & …) jdj.mit.edu/nlopt www.w.org jdj.mit.edu/meep erf(z) (and erfc, erfi, …) in SciPy 0.12+ & other EM simulators… jdj.mit.edu/book Confession: I’ve used Python’s internal C API more than I’ve coded in Python… A new programming language? Viral Shah Jeff Bezanson Alan Edelman julialang.org Stefan Karpinski [begun 2009, “0.1” in 2013, ~20k commits] [ 17+ developers with 100+ commits ] [ usual fate of all First reacBon: You’re doomed. new languages ] … subsequently: … probably doomed … sll might be doomed but, in the meanBme, I’m having fun with it… … and it solves a real problem with technical compuBng in high-level languages. The “Two-Language” Problem Want a high-level language that you can work with interacBvely = easy development, prototyping, exploraon ⇒ dynamically typed language Plenty to choose from: Python, Matlab / Octave, R, Scilab, … (& some of us even like Scheme / Guile) Historically, can’t write performance-criBcal code (“inner loops”) in these languages… have to switch to C/Fortran/… (stac). [ e.g. SciPy git master is ~70% C/C++/Fortran] Workable, but Python → Python+C = a huge jump in complexity. Just vectorize your code? = rely on mature external libraries, operang on large blocks of data, for performance-criBcal code Good advice! But… • Someone has to write those libraries. • Eventually that person may be you.
    [Show full text]
  • Data Visualization in Python
    Data visualization in python Day 2 A variety of packages and philosophies • (today) matplotlib: http://matplotlib.org/ – Gallery: http://matplotlib.org/gallery.html – Frequently used commands: http://matplotlib.org/api/pyplot_summary.html • Seaborn: http://stanford.edu/~mwaskom/software/seaborn/ • ggplot: – R version: http://docs.ggplot2.org/current/ – Python port: http://ggplot.yhathq.com/ • Bokeh (live plots in your browser) – http://bokeh.pydata.org/en/latest/ Biocomputing Bootcamp 2017 Matplotlib • Gallery: http://matplotlib.org/gallery.html • Top commands: http://matplotlib.org/api/pyplot_summary.html • Provides "pylab" API, a mimic of matlab • Many different graph types and options, some obscure Biocomputing Bootcamp 2017 Matplotlib • Resulting plots represented by python objects, from entire figure down to individual points/lines. • Large API allows any aspect to be tweaked • Lengthy coding sometimes required to make a plot "just so" Biocomputing Bootcamp 2017 Seaborn • https://stanford.edu/~mwaskom/software/seaborn/ • Implements more complex plot types – Joint points, clustergrams, fitted linear models • Uses matplotlib "under the hood" Biocomputing Bootcamp 2017 Others • ggplot: – (Original) R version: http://docs.ggplot2.org/current/ – A recent python port: http://ggplot.yhathq.com/ – Elegant syntax for compactly specifying plots – but, they can be hard to tweak – We'll discuss this on the R side tomorrow, both the basics of both work similarly. • Bokeh – Live, clickable plots in your browser! – http://bokeh.pydata.org/en/latest/
    [Show full text]
  • Numericaloptimization
    Numerical Optimization Alberto Bemporad http://cse.lab.imtlucca.it/~bemporad/teaching/numopt Academic year 2020-2021 Course objectives Solve complex decision problems by using numerical optimization Application domains: • Finance, management science, economics (portfolio optimization, business analytics, investment plans, resource allocation, logistics, ...) • Engineering (engineering design, process optimization, embedded control, ...) • Artificial intelligence (machine learning, data science, autonomous driving, ...) • Myriads of other applications (transportation, smart grids, water networks, sports scheduling, health-care, oil & gas, space, ...) ©2021 A. Bemporad - Numerical Optimization 2/102 Course objectives What this course is about: • How to formulate a decision problem as a numerical optimization problem? (modeling) • Which numerical algorithm is most appropriate to solve the problem? (algorithms) • What’s the theory behind the algorithm? (theory) ©2021 A. Bemporad - Numerical Optimization 3/102 Course contents • Optimization modeling – Linear models – Convex models • Optimization theory – Optimality conditions, sensitivity analysis – Duality • Optimization algorithms – Basics of numerical linear algebra – Convex programming – Nonlinear programming ©2021 A. Bemporad - Numerical Optimization 4/102 References i ©2021 A. Bemporad - Numerical Optimization 5/102 Other references • Stephen Boyd’s “Convex Optimization” courses at Stanford: http://ee364a.stanford.edu http://ee364b.stanford.edu • Lieven Vandenberghe’s courses at UCLA: http://www.seas.ucla.edu/~vandenbe/ • For more tutorials/books see http://plato.asu.edu/sub/tutorials.html ©2021 A. Bemporad - Numerical Optimization 6/102 Optimization modeling What is optimization? • Optimization = assign values to a set of decision variables so to optimize a certain objective function • Example: Which is the best velocity to minimize fuel consumption ? fuel [ℓ/km] velocity [km/h] 0 30 60 90 120 160 ©2021 A.
    [Show full text]
  • Using the COIN-OR Server
    Using the COIN-OR Server Your CoinEasy Team November 16, 2009 1 1 Overview This document is part of the CoinEasy project. See projects.coin-or.org/CoinEasy. In this document we describe the options available to users of COIN-OR who are interested in solving opti- mization problems but do not wish to compile source code in order to build the COIN-OR projects. In particular, we show how the user can send optimization problems to a COIN-OR server and get the solution result back. The COIN-OR server, webdss.ise.ufl.edu, is 2x Intel(R) Xeon(TM) CPU 3.06GHz 512MiB L2 1024MiB L3, 2GiB DRAM, 4x73GiB scsi disk 2xGigE machine. This server allows the user to directly access the following COIN-OR optimization solvers: • Bonmin { a solver for mixed-integer nonlinear optimization • Cbc { a solver for mixed-integer linear programs • Clp { a linear programming solver • Couenne { a solver for mixed-integer nonlinear optimization problems and is capable of global optiomization • DyLP { a linear programming solver • Ipopt { an interior point nonlinear optimization solver • SYMPHONY { mixed integer linear solver that can be executed in either parallel (dis- tributed or shared memory) or sequential modes • Vol { a linear programming solver All of these solvers on the COIN-OR server may be accessed through either the GAMS or AMPL modeling languages. In Section 2.1 we describe how to use the solvers using the GAMS modeling language. In Section 2.2 we describe how to call the solvers using the AMPL modeling language. In Section 3 we describe how to call the solvers using a command line executable pro- gram OSSolverService.exe (or OSSolverService for Linux/Mac OS X users { in the rest of the document we refer to this executable using a .exe extension).
    [Show full text]
  • Towards Practical Runtime Type Instantiation
    Towards Practical Runtime Type Instantiation Karl Naden Carnegie Mellon University [email protected] Abstract 2. Dispatch Problem Statement Symmetric multiple dispatch, generic functions, and variant type In contrast with traditional dynamic dispatch, the runtime of a lan- parameters are powerful language features that have been shown guage with multiple dispatch cannot necessarily use any static in- to aid in modular and extensible library design. However, when formation about the call site provided by the typechecker. It must symmetric dispatch is applied to generic functions, type parameters check if there exists a more specific function declaration than the may have to be instantiated as a part of dispatch. Adding variant one statically chosen that has the same name and is applicable to generics increases the complexity of type instantiation, potentially the runtime types of the provided arguments. The process for deter- making it prohibitively expensive. We present a syntactic restriction mining when a function declaration is more specific than another is on generic functions and an algorithm designed and implemented for laid out in [4]. A fully instantiated function declaration is applicable the Fortress programming language that simplifies the computation if the runtime types of the arguments are subtypes of the declared required at runtime when these features are combined. parameter types. To show applicability for a generic function we need to find an instantiation that witnesses the applicability and the type safety of the function call so that it can be used by the code. Formally, given 1. Introduction 1. a function signature f X <: τX (y : τy): τr, J K Symmetric multiple dispatch brings with it several benefits for 2.
    [Show full text]
  • Introduction to Ggplot2
    Introduction to ggplot2 Dawn Koffman Office of Population Research Princeton University January 2014 1 Part 1: Concepts and Terminology 2 R Package: ggplot2 Used to produce statistical graphics, author = Hadley Wickham "attempt to take the good things about base and lattice graphics and improve on them with a strong, underlying model " based on The Grammar of Graphics by Leland Wilkinson, 2005 "... describes the meaning of what we do when we construct statistical graphics ... More than a taxonomy ... Computational system based on the underlying mathematics of representing statistical functions of data." - does not limit developer to a set of pre-specified graphics adds some concepts to grammar which allow it to work well with R 3 qplot() ggplot2 provides two ways to produce plot objects: qplot() # quick plot – not covered in this workshop uses some concepts of The Grammar of Graphics, but doesn’t provide full capability and designed to be very similar to plot() and simple to use may make it easy to produce basic graphs but may delay understanding philosophy of ggplot2 ggplot() # grammar of graphics plot – focus of this workshop provides fuller implementation of The Grammar of Graphics may have steeper learning curve but allows much more flexibility when building graphs 4 Grammar Defines Components of Graphics data: in ggplot2, data must be stored as an R data frame coordinate system: describes 2-D space that data is projected onto - for example, Cartesian coordinates, polar coordinates, map projections, ... geoms: describe type of geometric objects that represent data - for example, points, lines, polygons, ... aesthetics: describe visual characteristics that represent data - for example, position, size, color, shape, transparency, fill scales: for each aesthetic, describe how visual characteristic is converted to display values - for example, log scales, color scales, size scales, shape scales, ..
    [Show full text]