The quickest way to deploy your Machine Learning model!!

The quickest way to deploy your Machine Learning model!!

Data science is all about presenting insights to the end-users in the most simplistic way possible. You work on a machine learning/deep learning model from data cleaning to hyperparameter tuning. However, you realize that the most important task of presenting it to the end-users has not even started yet. Here I discuss an easy and faster way to deploy ML models using Jupyter Notebook and Tableau.

We will use the Titanic dataset available on Kaggle to build a Random Forest model. The goal of the project is to predict if a passenger will likely survive the Titanic disaster or not. We will use demographic variables like Age, Gender, sibling count, and also the ticket class of the passenger as independent variables.

The dataset contains 891 rows with 177 missing values in Age. We replace the missing values with random numbers within one standard deviation around it’s mean. Similarly, we modify the NaNs in Fare to 0.

We build a Random Forest classifier with the default parameters. However, we achieved an accuracy of ~94.5% with just 6 variables suggesting that it could have overfitted on the training data. But, our focus is to deploy the trained model quickly. So, we will not try to get the best evaluation metrics like Precision or Recall. There are plenty of other resources on Kaggle which focus on that and here is a simple model without cross-validation or parameter tuning.

We need Python 2.x or Python 3.x already installed on our machine to start the deployment or you can use Anaconda to install Jupyter Notebook along with Python. Also, we need to install TabPy to launch a server that can host the deployed model. You can do that simply by following the steps here. If you feel that the installation command is taking time, then close the cmd prompt and try it in another one. I had to do it a couple of times to get it right.

Share it:
Share it:

[Social9_Share class=”s9-widget-wrapper”]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You Might Be Interested In

How to Develop a Talent Pipeline for Your Digital Transformation

30 Nov, 2019

In a global survey of 1,000 business leaders, we set out to discover what companies that are good at staffing …

Read more

Artificial Intelligence (AI) ethics: 5 questions CIOs should ask

14 Oct, 2020

You may not realize it, but artificial intelligence (AI) is already enhancing our lives in a multitude of ways. AI systems …

Read more

This Startup’s Robots Make Music to Make Your Brain Focus

6 Jul, 2016

Distractions have never been more ubiquitous than they are today:  social media apps, text messages, web browsers, pop-up ads,  email, and …

Read more

Do You Want to Share Your Story?

Bring your insights on Data, Visualization, Innovation or Business Agility to our community. Let them learn from your experience.

Get the 3 STEPS

To Drive Analytics Adoption
And manage change

3-steps-to-drive-analytics-adoption

Get Access to Event Discounts

Switch your 7wData account from Subscriber to Event Discount Member by clicking the button below and get access to event discounts. Learn & Grow together with us in a more profitable way!

Get Access to Event Discounts

Create a 7wData account and get access to event discounts. Learn & Grow together with us in a more profitable way!

Don't miss Out!

Stay in touch and receive in depth articles, guides, news & commentary of all things data.