building scalable prediction services in r
TRANSCRIPT
![Page 1: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/1.jpg)
Scalable Prediction Services with R
![Page 2: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/2.jpg)
#RstatsNYC @Socure
• Real-time fraud detection service using social and online data.
• Predictive R models.
• Latency SLA with customers.
• Model versioning.
• Zero-downtime updates.
![Page 3: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/3.jpg)
#RstatsNYC @Socure
Challenges• R not dev-ops friendly.
• Enterprise prediction services a large commitment.
• Enterprise prediction services offer limited model types.
• Transferability and transparency of models.
• Vendor lock-in.
![Page 4: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/4.jpg)
#RstatsNYC @Socure
Solution• Embed R models within dev-op friendly middleware.
• Management, deployment, integration leverages existing dev-op processes.
• Service scaling using established strategies and methods.
![Page 5: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/5.jpg)
#RstatsNYC @Socure
<file>gen_20150215.rds
saveRDS()
![Page 6: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/6.jpg)
#RstatsNYC @Socure
<model>name = generic version = 20150215
<file>gen_20150215.rds
readRDS()
saveRDS()
![Page 7: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/7.jpg)
#RstatsNYC @Socure
Rookhttp://…./model/20150215
<model>name = generic version = 20150215
name version
model 20150215
Model Map
<file>gen_20150215.rds
readRDS()
saveRDS()
![Page 8: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/8.jpg)
#RstatsNYC @Socure
Rookhttp://…./model/20150215
<model>name = generic version = 20150215
name version
model 20150215
Model Map
predict()
<file>gen_20150215.rds
readRDS()
saveRDS()
JSON
![Page 9: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/9.jpg)
#RstatsNYC @Socure
POST generic/20150215
Rook Rook Rook Rook
fork()
……..
![Page 10: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/10.jpg)
#RstatsNYC @Socure
pmml
http://…./generic/20150215
org.jpmml.evaluator ModelEvaluator doPost()
Servlet
evaluate()
unmarshalPMML()pmml.gbm()
![Page 11: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/11.jpg)
#RstatsNYC @Socure
ServletServletServletServlet
POST generic/20150215
……..
![Page 12: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/12.jpg)
#RstatsNYC @Socure
Virtual Machine
Docker Public Repository ECSElasticBeanStalk
R R RR R R
![Page 13: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/13.jpg)
#RstatsNYC @Socure
http://…./generic/20150215
ElasticBeanStalk
Prediction ServicePrediction
ServicePrediction Service
US-EAST-1A
Prediction ServicePrediction
ServicePrediction Service
US-EAST-1A
Prediction ServicePrediction
ServicePrediction Service
US-EAST-1A
![Page 14: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/14.jpg)
#RstatsNYC @Socure
![Page 15: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/15.jpg)
#RstatsNYC @Socure
![Page 16: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/16.jpg)
#RstatsNYC @Socure
![Page 17: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/17.jpg)
#RstatsNYC @Socure
Conclusions• Rapid deployment of R models in a scalable robust environment.
• Directly leverage R models developed by data scientists and analysts.
• Apply existing dev-ops processes for testing, monitoring, scaling, alerting of predictive models.
• Possible use of PMML to serialize models in future for compliance.
![Page 19: Building Scalable Prediction Services in R](https://reader031.vdocuments.us/reader031/viewer/2022030310/58f046931a28ab324e8b4687/html5/thumbnails/19.jpg)
#RstatsNYC @Socure
We’re Hiring
http://www.socure.com/hiring
Director of Data Science Senior Data Scientist
Director of Engineering