From the course: Deploying Scalable Machine Learning for Data Science
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Using Plumber to create APIs for R programs
From the course: Deploying Scalable Machine Learning for Data Science
Using Plumber to create APIs for R programs
- [Instructor] R is a widely used statistical analysis package and it's popular with data scientists. If you work with R and you want to be able to quickly deploy your R models as services, you can use a Plumber package. Plumber is an R package and can be installed in your R environment like any other R package. Once it is installed and loaded into your working environment, you can add simple commands to your code to create an API interface. Plumber uses a set of decorators. This is a specialized code that is added to your scripts. The Plumber package uses these specialized codes as directions for constructing API calls. The decorators are inserted as comments above functions that should have an API generated. Let's look at an example. Let's create a function that calls a classifier. Let's assume that we've created a few different classifiers, but we want to be able to use the same interface to call whichever one algorithm we think is best. In this case, we're calling a classifier…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.