ian mckenna, ph.d. senior application engineer€¦ · senior application engineer. 3 agenda ......

18
2 © 2018 The MathWorks, Inc. Integrating Python and MATLAB Ian McKenna, Ph.D. Senior Application Engineer

Upload: others

Post on 07-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

2© 2018 The MathWorks, Inc.

Integrating Python and MATLAB

Ian McKenna, Ph.D.

Senior Application Engineer

Page 2: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

3

Agenda

▪ How MATLAB fits into System Architecture

▪ Calling Python from MATLAB

▪ Calling MATLAB from Python

▪ Packaging MATLAB applications – Royalty free .py libraries

– RESTful API for business critical applications

▪ Q & A

Page 3: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

4

Solution Architect Technology Landscape

Page 4: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

5

MATLAB APIs

Page 5: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

6

Using MATLAB with Python

▪ Three ways to integrate:

– Calling Python from MATLAB

– Calling MATLAB from Python

– Packaging MATLAB programs for

scalable deployment with Python

Algorithm

Developers

Users

Page 6: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

7

Price Trend Predictor

▪ Goal:

– Software as a service: Cryptocurrency price forecaster

▪ Approach:

– Use IT managed data import libraries

– Rapidly build predictive models

– Deploy analytics to enterprise using RESTful API

Page 7: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

8

Crypto Data

Model

Developers

IT

Professionals

Business

Users

Price Data

Get current price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Last 24 hours: -0.11%

Current Setup

Page 8: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

9

Crypto Data

Model

Developers

IT

Professionals

Business

Users

Price Data

Get current price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Last 24 hours: -0.11%

New Idea

Price Data

Get future price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Predicted price in 1 day: $670.21

Page 9: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

10

Crypto Data

Model

Developers

IT

Professionals

Business

Users

Price Data

Get current price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Last 24 hours: -0.11%

Building The Model

Page 10: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

11

Prediction Model Development

Page 11: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

12

Crypto Data

Model

Developers

IT

Professionals

Business

Users

Price Data

Get current price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Last 24 hours: -0.11%

Testing The Model

Page 12: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

13

MATLAB

Runtime

Crypto Data

Model

Developers

IT

Professionals

Business

Users

Price Data

Get current price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Last 24 hours: -0.11%

Deploying The Model

Price Data

Get future price data for cryptocurrencies

Coin: ETH

Current price: $632.83

Predicted price in 1 day: $670.21

Page 13: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

14

.py.py

MATLABDesktop

End-UserMachine

1

2 3

Toolboxes

Desktop Deployment with MATLAB

MATLAB CompilerMATLAB

Runtime

MATLAB

Page 14: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

15

Enterprise Challenges

▪ Responding to new requirements

▪ Maintaining software version

▪ Supporting multiple use cases

▪ Get models into hands of decision makers faster

Page 15: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

18

▪ C/C++

▪ Java

▪ C# and .NET

▪ Python

▪ Excel

▪ COM Automation Server

▪ RESTful, HTTP, and WSDL web

services

Enterprise Deployment and Scalability of MATLAB

Web

Server

Application

Server

Database Server

Pricing

Risk

Analytics

Scenario

Generation

MATLAB Production Server

MATLAB

Compiler SDK

Web

Applications

Desktop

Applications

ExcelAdd-in

Batch

Applications

Page 16: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

20

Summary: Using MATLAB with Python

▪ Calling IT-managed libraries in Python

from MATLAB– MATLAB

▪ Calling MATLAB’s predictive analytics

from Python– MATLAB

▪ Packaging MATLAB applications for

scalable deployment with Python

– Desktop: MATLAB Compiler SDK

– Enterprise: MATLAB Production Server

Page 17: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

21

Additional Resources

▪ MATLAB and Python

– https://www.mathworks.com/solutions/matlab-and-python.html

▪ Predictive Analytics

– https://www.mathworks.com/discovery/predictive-analytics.html

▪ Deep Learning

– https://www.mathworks.com/discovery/deep-learning.html

Page 18: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster

22© 2018 The MathWorks, Inc.