Showing posts with label Machine Learning. Show all posts
Showing posts with label Machine Learning. Show all posts

Tuesday, 27 March 2018

ML-DL model as a Service - MLaaS

It is not always the case when we have to give or share the ML/DL model or algorithm with Client, sometime we want to allow users to use our model but without sharing the code or without setting up the infrastructure at Client end.

There is a way to achieve this, Convert your model as a Service, Yes, You can do that. You can expose your model as a Rest Service and user can use the method supported by your Service program. Today, we are going to learn the same.
Let's see how -

Tools Required - 
Flask - A python web server
and of course Python :-)

ML/DL Model Creation: 
For this part, I am picking very basic ML problem - IRIS dataset Classification.
Below code will create a Logistic Regression Classification Model and Save the model as a file.

Flask Web Server - REST Service
In below code, we are creating a REST service hosted on local system and having endpoint as "\iris" and Posting the array input to predict the IRIS species

How to run Flask Server:

Call ML Service:  From Command Line:

Call ML Service:  From Postman Client:

Like the below page to get update  
Facebook Page      Facebook Group      Twitter Feed      Google+ Feed      Telegram Group     

Friday, 3 February 2017

Learning Matplotlib #2

Saturday, 14 January 2017

Learning Numpy #2

Thursday, 12 January 2017

Learning Numpy #1

Numpy is a python library used for numerical calculations and this is better performant than pure python. In this notebook, I have shared some basics of Numpy and will share more in next few posts. I hope you find these useful.

Click Here for Next Tutorial ~

Like the below page to get update

Wednesday, 11 January 2017

My Learning Path for Machine Learning

I am a Python Lover guy so my way includes lots of Python points. If you dont know the basics of this wonderful language, start it from HERE else you can follow the links which I am going to share.

Learning ML is not only studying ML algorithms, it includes Basic Algebra, Statistics, Algorithms, Programming and lot more. But no need to afraid as such :-) we need to start from somewhere.....

This is my github repo, you can fork it and follow me with these 2 links --

Fork Fork
Follow - Follow @atulsingh0
I am still updating this list and welcome you to update this as well.

Like the below page to get update

Friday, 6 January 2017

10 minutes with pandas library

Thursday, 5 January 2017

Learning Pandas #5 - read & write data from file

Wednesday, 4 January 2017

Learning Pandas #4 - Hierarchical Indexing

Sunday, 1 January 2017

Learning Pandas #3 - Working on Summary & MissingData

Saturday, 31 December 2016

Learning Pandas - DataFrame #2

Friday, 30 December 2016

Learning Pandas - Series #1

Wednesday, 28 December 2016

Learning Graphlab - SFrame #2

In last post Learning Graphlab - SFrame #1, we have learn basics of SFrame, like how to create, add or delete the columns in SFrame. In this post, we will revise it once again and learn some advance features of SFrame. Have a good learnng !!!

You can view the Jupyter Notebook for the same HERE

Sunday, 18 December 2016

R Points #1 - Matrix & Factor Basics

Saturday, 17 December 2016

R Points #0 - Basics n Vector


Like the below page to get update

Wednesday, 30 November 2016

Learning Graphlab - SFrame #1

Hoping you guys went through the last post (Lnk -> Getting Started with Graphlab), In this post we will do some handson SFrame datatype of Graphlab which is same as dataframe of pandas python library.

i. Reading the CSV file

ii. save DataSet 

iii. load DataSet

iv. Check Total Rows and Columns

v. Check Columns data type and Name

vi. Add new column

vii. Delete column

viii. Rename column

ix. Column Swapping (location)

Like the below page to get update

Sunday, 27 November 2016

Getting Started with Graphlab - A Python library for Machine Learning

Before Starting with Graphlab, We have to configure our system with some basic tools such as Python, Jupyter Notebook etc. You can find 'How-To' on this link -

What is GraphLab ??
GraphLab Create is a Python library, backed by a C++ engine, for quickly building large-scale, high-performance data products. Some key features of GraphLab Create are:
  • Analyze terabyte scale data at interactive speeds, on your desktop.
  • A Single platform for tabular data, graphs, text, and images.
  • State of the art machine learning algorithms including deep learning, boosted trees, and factorization machines.
  • Run the same code on your laptop or in a distributed system, using a Hadoop Yarn or EC2 cluster.
  • Focus on tasks or machine learning with the flexible API.
  • Visualize data for exploration and production monitoring.
After the installation of Graphlab library we can use it as any python library.

Use Jupyter Notebook for starter, Open a Python notebook in Jupyter Notebook and execute below commands to see graphlab working -

 a. Importing Graphlab - 


b. Reading CSV file
This method will parse the input file and convert it into a SFrame variable


c. Getting Started with SFrame 

i. View content of SFrame variable sf


ii. View Head lines (top lines) 


ii. View Tail lines (last lines)

Like the below page to get update

Monday, 14 March 2016

Machine Learning - Learning Steps

Step 1
Overview of Machine Learning
Supervised vs. Unsupervised Learning
Classification vs. Regression
Real-world Applications

Step 2
Cleaning and mining real-world data
Data pre-processing
Exploratory data analysis and visualisation

Step 3
The K Nearest Neighbour (KNN) algorithm
Reporting performance metrics
Decision boundary visualisation

Step 4
Validation techniques
The bias-variance trade-off
Hyper-parameter tuning, grid search and model selection

Step 5
Decision Trees
Ensemble models
Random Forests
Extremely Randomised Trees

Step 6
Build and optimise a classifier on new real-world data

Step 7
Biological inspiration and architecture
Network topologies
Learning algorithms and cost functions

Step 8
Motivation and architecture
Real-world examples
Impact and limitations of Deep Learning

Like the below page to get update

Machine Learning Links you must Visit

1. Scikit-Learn Tutorial Series -
2. 7 Free Machine Learning Courses - 
3. k-nearest neighbor algorithm using Python -
4. 7 Steps to Mastering Machine Learning With Python -

Analytics in Python 

1. Learning Pandas #1 - Series -
2. Learning Pandas #2 - DataFrame  -
3. Learning Pandas #3 - Working on Summary & Missing Data -
4. Learning Pandas #4 - Hierarchical Indexing -

Like the below page to get update

DataScience Links you must Visit

1. Python (and R) for Data Science - sample code, libraries, projects, tutorials -
2. 19 Worst Mistakes at Data Science Job Interviews - 

Like the below page to get update