The document discusses how Domino Data Lab can be used to deploy predictive models as APIs. It provides examples of using Domino to build, evaluate, and deploy predictive models for the Iris dataset and stock market forecasting. Key features discussed include the web and R interfaces, code sharing, scheduled runs, automatic version control, and publishing models as APIs for other applications to access.
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
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
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
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
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
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