Skip to content

Ashwini-Rao/ExposingModelAsAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Rest APIs to Expose Model as a Service

By exposing the R Model as Rest API, we can let other applications to use model for the purposes it is designed for without having to worry about the underlying environment/architecture. We can do this using an R package - "Plumber". Plumber is straightforward and easy to use. It is an open source package that lets you create APIs by decorating the R functions with special annotations/comments. Comments can be prefixed with "#'" or "#*". "#'" is recommended.

Process flow diagram

Entire Process Flow

R Packages and Client Softwares

  • randomForest: R package used for taining the titanic problem using random forest algorithm. Check the random forest R Documentation for more details
  • caret: R package used for plotting Confusion Matrix to evaluate model performance. Check the caret R Documentation for more details
  • plumber: R package to create REST APIs. Check the rplumber Documentation for more details
  • Postman: API Development Tool used for REST API validation. Check the Postman website for more details
  • curl: Command line tool used for REST API validation. Check the curl website for more details

Dataset used

Dataset used as an example here is downloaded from Kaggle - Titanic: Machine Learning from Disaster

Link to Jupyter notebook

For a detailed walk-through of this project, read up ExposingModelAsAPI

Closing Remarks

Here are a few other packages in R that help in exposing R models through API development:

  • DeployR - It is Microsoft's integration platform for R analytics inside web, mobile, desktop, dashboard as well as backend applications
  • OpenCPU - Provides reliable and interoperable HTTP APIs for data analysis based on R. One of the likely one to choose for production
  • Shiny - It is an R package that helps build interactive web applications from R
  • rApache - It is a project supporting web application development using the R

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published