SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Deploying your Predictive Models as a Service via Domino
8.
Why I use Domino
• Data science is complicated.
o Knowing how to fit a model is not enough!
o Variety of challenges from data analysis to production.
o There is no one-size-fits-all solution.
• I do not have time/skills for every single task.
• I can use Domino to fill the gaps.
• Focus on understanding problems, improving
models and presenting results.
• Speed up analysis in just a few clicks.
• More time for family and other stuff.
6/16/2015LondonR 8
9.
How I use Domino
• Interface
o Web or R
• Examples
o Hello, World! (Iris)
o Stock Market Forecast
• Code Sharing
• Try it Yourself
6/16/2015LondonR 9
10.
Web Interface
6/16/2015LondonR 10
Control Panel
A List of Runs
Console
11.
Web Interface
6/16/2015LondonR 11
Resource Usage (I found it very useful!)
14.
“Hello, World!” Example
• Classic dataset - Iris
• Four numeric features / predictors (x)
o Sepal Length, Sepal Width, Petal Length and Petal Width
• One categorical target (y)
o Three species of Iris – Setosa, Versicolor and Virginica
• Using R to build a simple predictive model
• Saving the model for future use
• Deploying the model as web service
• Automatic version control
6/16/2015LondonR 14
16.
Upload and Run
6/16/2015https://app.dominoup.com/jofaichow/example_iris 16
Upload the R script to
Domino (Web / R)
Start the Run
(Web / R)
17.
Evaluate and Save
6/16/2015LondonR 17
Print “Random Forest”
model summary
Model with highest
10-fold cross-
validation accuracy
(i.e. best parameter
setting)
Include statistics for
future comparison
Finally, save the model
for future use
18.
Deploy
6/16/2015LondonR 18
Model
This script 1) loads the model, 2) takes four numeric inputs
(X1, X2, X3 & X4) and then 3) returns a prediction.
19.
Deploy
6/16/2015LondonR 19
Point to that script
Specify the function to call
Publish or unpublish the API
Domino automatically keeps all versions of your API
21.
Python API Example
6/16/2015LondonR 21
X1, X2, X3 and X4
The four Iris features:
Sepal Length, Sepal Width,
Petal Length and Petal Width
22.
Stock Market Forecast
• Historical stock data from Yahoo!
• Using R to generate numeric features (x)
• Target (y) – Next Trading Day % Change in Closing
Price
• Using R to build ensembles for forecast
• Configure scheduled runs
• Automatic version control
• API
6/16/2015LondonR 22
23.
Predictive Model
6/16/2015LondonR 23
Historical stock price
data from Yahoo!
x: Multiple Technical Analysis Indicators
y: Next Day % Change in Closing Price
Predictive Model:
Ensemble of xgboost models
For more info, see
app.dominoup.com/jofaichow/example_stock
24.
Scheduled Runs
6/16/2015LondonR 24
Point to the R script
Schedule to run at a certain time every
Weekday (more options available)
Re-publish API endpoint so it uses the latest results
Select different hardware tiers
Notify your friends / colleagues / clients
25.
Results Notification
6/16/2015LondonR 25
Summary PDF
26.
Automatic Version
Control
6/16/2015LondonR 26
Latest Version One of the Previous Versions
(I was experimenting with ggplot2)
27.
Stock API Endpoint
6/16/2015LondonR 27
Stock Symbol (Ticker) for Query
28.
Code Sharing
6/16/2015LondonR 28
Control Panel Settings One Click
29.
Try it Yourself
6/16/2015LondonR 29
Register at www.dominodatalab.com
Help, Quick Start, Forum at support.dominodatalab.com
30.
Try it Yourself
6/16/2015LondonR 30
Go to https://app.dominoup.com/jofaichow/example_iris
31.
Set up your first API
Endpoint in Minutes
6/16/2015LondonR 31
Point it to your own project
Insert your own API key
32.
Conclusions
• Data science is complicated.
• Our time is important.
• I can use Domino to save time.
• It helps me to tackle some challenges
that are outside my comfort zone.
6/16/2015LondonR 32
33.
Thanks!
• Mango Solutions
• My Colleagues at Domino
• More Info and Feedback
o jofai@dominoup.com
o Twitter: @matlabulous
o http://blog.dominodatalab.com/
• Code
o Iris Example –
https://app.dominoup.com/jofaichow/example_iris
o Stock Example –
https://app.dominoup.com/jofaichow/example_stock
6/16/2015LondonR 33