Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

INTRODUCTION TO MACHINE

LEARNING
WHAT IS MACHINE LEARNING?

• AI is typically imagined as machines possessing human levels of intelligence


• Intelligence can be attested to the ability to think
• Can machines think?
• Can machines do what humans do?
• Can machines learn?
• The ability of a computer or machine to ‘learn’ from data fed to it and
produce some useful output or inference is called machine learning

• Learning takes place via algorithms driven by mathematics

• Formal definition: place with the help of algorithms driven by mathematics.


The ability of a computer or a machine to ‘learn’ from data fed to it and
produce some useful output or inference is called machine learning. This
learning takes
Common use-cases:
 Recommendation engine – Netflix: you may like, Spotify:
(songs, artists) similar to
 Healthcare improvement – cancer detection, heart abnormality
detection, diabetes detection
 Agriculture – disease detection in plants, crop sowing and
cultivation
 Daily life – traffic prediction, weather forecast
MACHINE LEARNING VS TRADITIONAL
PROGRAMMING

• Traditional Programming workflow

• Machine Learning workflow


• Example:
Inputs = Previous transactions and demographic history
Output = Previous data of whether a customer has churned (renewed) or not
Model = Model to predict whether a customer will churn in the future or not
TYPES OF MACHINE LEARNING - I

Based on type of Learning:


1. Supervised Machine Learning
2. Unsupervised Machine Learning
3. Semi-Supervised Machine Learning
4. Reinforcement Learning
SUPERVISED LEARNING

• Inputs and Outputs are provided to the model/algorithm


• Algorithm uses the difference or the ‘error’ between the calculated output
and the actual output to improve the model
• The improved model is then used to make predictions on new or actual data
• Regression and Classification
Example:
Inputs = Cancerous cell images
Outputs = Labels of benign or malignant
Model = Model that can predict whether a person has benign cancerous cells or
malignant ones
UNSUPERVISED LEARNING

• Only inputs are provided to the model. No explicit outputs are provided
• Algorithms work on the data to group together inputs with similar traits.
These groups are also called ‘clusters’
• Clusters give us an idea about the similarity of the points in the cluster
• Unsupervised learning can help provide inferences/outputs that are not
discernable normally
Example:
Inputs = Economic and demographic features of countries such as GDP, Happiness Index
ranking, etc
Model = Model that clusters together countries that have similar situations economically
Outputs/Inferences = Clusters of countries with similar feature. E.g. – countries with
broken economies and below par standards of living (Venezuela, Somalia, Liberia),
countries with booming economies and better quality of living (USA, Germany, Canada)
SEMI-SUPERVISED LEARNING
• Inputs are provided along with a proportion of labelled output data
• This serves the purpose of calculating specific outputs while also enabling
clustering to take place
SEMI-SUPERVISED LEARNING

• Initially, a classifier (e.g., naïve Bayesian classifier) is trained with the small labeled
set considering all features.
• The classifier is then applied to classify the unlabeled set.
• Those most confidently classified (or unlabeled) documents of each class, together
with their predicted class labels, are added to the labeled set.
• The classifier is then re-trained and the procedure is repeated.
• This process iterates until all the unlabelled documents are given class labels. The
basic idea of this method is that the classifier uses its own predictions to teach itself.
REINFORCEMENT LEARNING

• Model is provided with inputs and feedback


• Positive feedback is given if a correct decision is made, and negative
feedback is given if an incorrect decision is made
• Learning takes place from the feedback and the model can discern which
actions/decisions are correct
Example:
Google DeepMind engine can play old Atari video games (arcade games) by
learning from the mistakes it has made throughout the runtime of a game
YouTube Link - https://www.youtube.com/watch?v=dJ4rWhpAGFI
TYPES OF MACHINE LEARNING - II

Based on type of output:


1. Regression
2. Classification
REGRESSION

• It is used to predict continuous or numerical outputs


• It is a form of supervised learning
• Algorithm examples – Linear Regression, Ridge Regression
• Use-case examples - Prediction of sales forecast (in currency), prediction of
temperature (in Celsius/Fahrenheit), prediction of rainfall (in mm, inches)
REGRESSION
REGRESSION

•    Mathematically:
 =
OR

OR

OR


• If α is too small, gradient descent can be
slow.

• If α is too large, gradient descent can


overshoot the minimum. It may fail to
converge, or even diverge.
update
And
simultaneously
REGRESSION CONTD.
CLASSIFICATION

• It is used to predict a ‘class’ or a category


• It is a form of supervised learning
• Algorithm Examples – K Nearest Neighbors classifier, SVM classifier
• Use-case examples:
Binary classification – spam or not spam, benign or malignant cancer
Multiclass classification – species of flowers, genre of a movie
KNN CLASSIFICATION
ACCURACY MEASURES OF CLASSIFIER
PRECISION AND RECALL

• Precision : It is the number of correct positive results divided by the number
of positive results predicted by the classifier.

• Recall : It is the number of correct positive results divided by the number
of all relevant samples (all samples that should have been identified as
positive).
                       

F1-SCORE

• F1 Score is the Harmonic Mean between precision and recall. The range for F1
Score is [0, 1]. It tells you how precise your classifier is (how many instances it
classifies correctly), as well as how robust it is (it does not miss a significant
number of instances).
• High precision but lower recall, gives you an extremely accurate, but it then
misses a large number of instances that are difficult to classify. The greater the F1
Score, the better is the performance of our model. Mathematically, it can be
expressed as :
THANK YOU!

You might also like