Book Image

Applied Supervised Learning with R

By : Karthik Ramasubramanian, Jojo Moolayil
Book Image

Applied Supervised Learning with R

By: Karthik Ramasubramanian, Jojo Moolayil

Overview of this book

R provides excellent visualization features that are essential for exploring data before using it in automated learning. Applied Supervised Learning with R helps you cover the complete process of employing R to develop applications using supervised machine learning algorithms for your business needs. The book starts by helping you develop your analytical thinking to create a problem statement using business inputs and domain research. You will then learn different evaluation metrics that compare various algorithms, and later progress to using these metrics to select the best algorithm for your problem. After finalizing the algorithm you want to use, you will study the hyperparameter optimization technique to fine-tune your set of optimal parameters. The book demonstrates how you can add different regularization terms to avoid overfitting your model. By the end of this book, you will have gained the advanced skills you need for modeling a supervised machine learning algorithm that precisely fulfills your business needs.
Table of Contents (12 chapters)
Applied Supervised Learning with R
Preface

Introduction to plumber


Plumber is an R package that helps in translating R functions into an HTTP API that can be invoked from other machines within a network, enabling communication between systems. By using R plumber, we will be able to achieve the advantages discussed, such as developing modularized, language agnostic, common communication language (JSON) based HTTP rest APIs that provide a defined path of communication between systems. Using plumber is extremely straightforward. With a few lines of code, we can convert our existing R functions into a web service that can be served as an endpoint.

In this chapter, we will extend the same model and use case we built in Chapter 7, Model Improvements, to classify whether a patient is diabetic using the PimaIndiasDiabetes dataset in the mlbench library. Later, we will extend the same use case to deploy the model as a web service using a Docker container and serverless applications.

Exercise 98: Developing an ML Model and Deploying It as a...