Join my course at Udemy (Python Programming Bible-From beginner to advanced )

Blogger templates

Monday 6 April 2020

Machine Learning & Intelligence


Introduction to Machine Learning

Machine Learning and intelligence has become essential in our daily life. For any product to be successful in the market following components are required :

1) GUI- The user interface should be intuitive so that any user of the product can quickly understand to operate the product. One need not go through a manual to understand the working of the product. For example one need not read a manual to operate an android application. The App is so intuitive that anyone, regardless of age, can easily understand how to work with the App. Now even a kid can operate application without any difficulty and assistance.

2) Infrastructure - Infrastructure plays very important role in defining the user base of the product across the world. In today's global world, if a user uploads a video on youtube, anyone in the world can easily access the video. A message in facebook and twitter is available instantly for anyone in the world to view provided they have the internet connection. Infrastructure define the reach of the product across the world.


3) Intelligence - Mankind has done tremendous progress in GUI and Infrastructure field. The latest addition for must have feature in the product is Intelligence. Idea is that product should be intelligent enough to read the mind of its user. When we try to write a sentence in google, google is intelligent enough to suggest a set of words based on our search. Facebook is able to suggest us who can be our friends based on similarities. There are tremendous example of face recognition system, where the application can identify the person based on their behavior, past history and so on. Bottom line is in current global environment, for product to be ssuccesful in the market, it needs to be intelligent enough to read the mind of its user.

What is Intelligence ?

So now the question is what is intelligence ? How do we define intelligence ?
Let's consider the following example.


A normal human being will be able to identify all the digits from 0 to 9 very easily. Note that all humans would not have seen the same shape of digit before but we all can understand how 0 looks like and how it is different from digit 1 and 2 and so on. And so we will be able to easily identify the digit 0, digit 1 and so on.

Based on the above example we can define the intelligence as 'Generalization'. It is  'Ability to predict or assign a label to an new or unseen observation based on the past experience.' Note that all humans would not have seen the 'same shape' of digit before but we all would have seen digit 0, 1, to 9 in some form. Based on the past experience we would have made a model in our mind how digit 0 to digit 9 should look like 'in general'. And hence if we see some "unseen" shape of the digit 0 to 9, we can easily identify the digit. 

Intelligence is not a lookup the way we do by storing the information in database. Lookup require exact match of "unseen" observation from the data stored in database. Intelligence is not about lookup but it is all about 'Generalization'.

How do we make a Machine intelligent ? 

Let's consider another example for identification of mail-spam. There can be two way to approach this use case. 

First approach  - Lookup approach

In the first approach we can list all the words that can appear in the mail as a lookup and if any of the words appear in the mail, we would tag the mail as SPAM. For example, if a mail has words like "Subscribe", "Chat" or "credit card" etc then we can tag the mail as SPAM. We will need to create a database of these words and everytime a mail comes, we need to lookup the database and conclude whether mail is SPAM or not. In this approach if the sender changes the word or introduce a new word in the mail, the model would not be able to recognize the mail a SPAM. This will again require update in the database to introduce the new word. 


Second Approach - ML way 

In the second approach we provide intelligence to our machine. Based on past email history, we create a model with the title, message length, repeated words etc to classify whether mail is SPAM or not a SPAM. In other words intelligent model will not be based on words in the model but will be based on unusual pattern derived from historical data of SPAM mail. 


Types of Machine Learning

Most of the machine learning use cases falls into one of two categories :
  • Supervised Learning
  • Unsupervised Learning

Supervised Learning

In supervised learning each of the observation is associated with the response. The goal is to fit a model that aims to predict the response based on the set of the observation. It is about creating an algorithm that detects a pattern between an observation and the response. Classifying e-mail as SPAM mail, predicting the resale value of house, predicting the future stock price are some of the examples of supervised learning. Linear Regression, Logistics Regression, SVM, Decision Tree, Random Forest etc are some of the examples of supervised learning.

Unsupervised Learning

In unsupervised learning, there are no response variable. The goal is to detect pattern among the observation in the dataset and come up with important insights in the dataset. Cluster analysis is one of important mechanism of unsupervised machine learning. Market segmentation to understand the buying pattern of people, recommendation algorithm to recommend next set of merchandise for the buyer are some of the examples of unsupervised learning. K-Means and hierarchical clustering, PCA, Apriori learning etc are some of the examples of unsupervised learning.


Summary

In summary, ML is about making machine more intelligent by deriving unusual pattern from the historical data. It is one step ahead from the lookup pattern to make machine solve the use case in an intelligent manner.

Reference

1.  Hands-On Machine Learning with Scikit-Learn and TensorFlow by Aurélien Géron

2. An Introduction to Statistical Learning: With Applications in R, by Jareth James, Trevor Hastie, Robert Tibshirani, Daniels Witten






Share:

0 comments:

Post a Comment

Feature Top (Full Width)

Pageviews

Search This Blog