![Page 1: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/1.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/4.jpg)
5
MATLAB APIs
![Page 5: Ian McKenna, Ph.D. Senior Application Engineer€¦ · Senior Application Engineer. 3 Agenda ... –Software as a service: Cryptocurrency price forecaster](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/12.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/15.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/17.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022052803/5f2ad2bf700ca50eb16d6f10/html5/thumbnails/18.jpg)
22© 2018 The MathWorks, Inc.