SlideShare a Scribd company logo
1 of 32
{
An Introduction to
Machine Learning
By : Avinash Kumar Saw
Department of Information Technology
IIEST Shibpur
Table of Contents :
• What is Machine Learning ?
• How does it work ?
• An example on Machine Learning
• Why it is required ?
• Various Machine learning algorithms
- Collaborative filtering
• Applications
• References
What is Machine Learning ?
Machine Learning is subfield of Artificial Intelligence
concerned with algorithms that allow computers to learn.
It is the ability of a machine to improve its own performance
through repetition and experience.
“Machine Learning is the field of study that gives computers the
ability to learn without being explicitly programmed.” – Arthur
Samuel way back in 1959.
“A computer program is said to learn from experience E with
respect to some task T and some performance measure P, if its
performance on T, as measured by P, improves with experience
E.” – Tom Mitchell, Carnegie Mellon University
SO CONFUSING ??
How does it work ?
By implementing algorithms that can learn from and
make predictions on data.
Such algorithms operate by building a model from
example inputs in order to make data-driven predictions
or decisions, rather than following strictly static program
instructions.
Machine Learning algorithms are often categorized as :
• Supervised machine learning : The program is “trained” on a
pre-defined set of “training examples”, which then facilitate its
ability to reach an accurate conclusion when given new data.
• Unsupervised machine learning : The program is given a bunch
of data and must find patterns and relationships therein.
In the majority of supervised learning applications, the
ultimate goal is to develop a finely tuned predictor
function h(x) (sometimes called the “hypothesis”).
A very simple predictor function can be of form :
h(x) = θ0 + θ1 x
where θ0 and θ1 are constants. Our goal is to find the
perfect values of θ0 and θ1 to make our predictor work as
well as possible.
A simple machine learning example :
Company employees satisfaction rating based on employee salary
First we have to initialize our predictor h(x) with some reasonable values of θ0 and θ1 .
Now our predictor looks like this when placed over our training set:
h(x) = 12.00 + 0.20 x
If we ask this predictor for the satisfaction of an employee making $60k, it would predict
a rating of 24 , which is a terrible guess because the machine doesn’t know much.
So now, let’s give this predictor all the salaries from our training set, then the
predictor function may look like this :
h(x) = 13.12 + 0.62 x
If we repeat this process , say 1000 times, this will give us a better predictor
function h(x) = 15.54 + 0.75 x
Now if we ask the machine again for the satisfaction rating of the employee who
makes $60k, it will predict a rating of roughly 60.
Why it is required ?
• To deal with complex real world problems.
• To produce models that can analyse bigger, more complex data
and deliver faster, more accurate results – even on a very large
scale.
• Machine Learning solves problems that cannot be solved by
numerical means alone.
This is possible because of :
• More cheaper and powerful computational processing
available these days.
• Growing volumes and varieties of available data.
• Affordable data storage.
Some Machine Learning algorithms :
• Collaborative filtering
• Decision Tree learning
• Artificial neural networks
• Clustering
• Genetic algorithm
• Inductive logic programming
• Similarity and metric learning
• Bayesian networks
Collaborative filtering :
A technique used by some recommender systems.
Also called social filtering , because it filters information based
on the recommendations of other people.
Used by online shopping sites like Amazon , like suggesting
products to the users or recommending an item to the user
based on the information collected from them.
An example of collaborative filtering :
Suppose , you want a recommendation of a movie from your friends.
But your friends may not have the same “taste” in movies as yours.
As more and more options become available, it becomes less practical
to decide what you want by asking a small group of people, since they
may not be aware of all the options. This is why a set of techniques
called collaborative filtering was developed.
The algorithm consists of :
• Collecting the preferences
• Finding similar user - 1. Euclidean Distance Score
2. Pearson Correlation Score
• Ranking the critic
• Recommending items
Collecting preferences :
Collect the preferences from your friends , ie , the rating given by them to
different movies and store them in a dictionary(in python) or a Map(in C++)
# A dictionary of movie critics and their ratings of a small set of movies
Critics = {‘Ranjan': {‘Dabang': 2.5, ‘Tashan': 3.5,
'Just My Luck': 3.0, 'Superman Returns': 3.5, ‘Dilwale': 1.5,
'The Night Listener': 3.0},
‘Govind': {' Dabang ': 3.0, ' Tashan ': 3.5,
'Just My Luck': 1.5, 'Superman Returns': 5.0, 'The Night Listener': 3.0,
' Dilwale': 3.5},
‘Shankul': {' Dabang ': 4.5, ' Tashan ': 3.0,
'Superman Returns': 3.5, 'The Night Listener': 4.0},
‘Ashish': {' Tashan ': 3.5, 'Just My Luck': 3.0,
'The Night Listener': 4.5, 'Superman Returns': 4.0,
' Dilwale ': 2.5},
‘Niraj': {' Dabang ': 3.0, ' Tashan ': 4.0,
'Just My Luck': 2.0, 'Superman Returns': 3.0, 'The Night Listener': 3.0,
' Dilwale ': 2.0},
‘Shubham': {' Dabang ': 3.0, ' Tashan ': 4.0,
'The Night Listener': 3.0, 'Superman Returns': 5.0, ' Dilwale ': 3.5},
‘Manish': {' Tashan ':4.5,' Dilwale ':1.0,'Superman Returns':4.0}}
Finding similar users :
• Determine how similar people are in their tastes.
• Compare each person with every other person and
calculate a similarity score.
• Two ways to do this : Euclidean distance and Pearson
correlation.
Euclidean Distance Score :
people in preference space
Dabang
5
Manish
4 Shankul
Shubham
3 Niraj Govind
2 Ranjan
1
0 Dilwale
1 2 3 4 5
Calculate the Euclidean distance between every pair of points.
For eg , to calculate the Euclidean distance between Manish and Niraj :
float euclid_distance = sqrt( pow(4.5 – 3, 2) + pow(3 – 2, 2) )
This formula calculates the distance, which will be smaller for people who
are more similar. However, you need a function that gives higher values for
people who are similar. This can be done by adding 1 to the function (to
prevent a division-by zero error) and inverting it:
float req _dist = 1/(euclid_distance + 1)
So now, the req_dist will give values between 0 and 1. A value close to 1 will
indicate that the two person’s tastes are similar , ie, they have identical
preferences.
#Returns a distance-based similarity score for person1 and person2
def similarity(prefs,person1,person2):
# Get the list of shared_items
si={ }
for item in prefs[person1]:
if item in prefs[person2]:
si[item]=1
# if they have no ratings in common, return 0
if len(si)==0 : return 0
# Add up the squares of all the differences
sum_of_squares = sum([pow(prefs[person1][item] - prefs[person2][item],2)
for item in prefs[person1] if item in prefs[person2]])
return 1/(1+sum_of_squares)
Ranking the critics :
Score everyone against a given person and finds the closest matches. In this
case, you’re interested in learning which movie critics have tastes similar to
you so that you know whose advice you should take when deciding on a
movie.
# Returns the best matches for person from the prefs dictionary.
# Number of results and similarity function are optional params.
def topMatches(prefs, person, n=7, similarity=req_dist):
scores=[(similarity(prefs, person, other), other)
for other in prefs if other!=person]
# Sort the list so the highest scores appear at the top
scores.sort( )
scores.reverse( )
return scores[0:n]
Recommending items :
Critic Similarity
Govind 0.99
Ranjan 0.98
Shankul 0.92
Manish 0.85
Ashish 0.96
Shubham 0.88
Niraj 0.84
This table suggests that you
should take Govind’s advice on
what movie to watch.
Applications
Few examples of machine learning applications that you may be familiar with :
• The self-driving Google car.
• Search engines
• Online recommendation offers like those from Amazon and Netflix -
Machine learning applications for everyday life.
• Facebook's News Feed uses machine learning to personalize each member's
feed.
• Knowing what customers are saying about you on Twitter - Machine
learning combined with linguistic rule creation.
Applications of Machine Learning in various domains :
• Web search
• Computational biology
• Finance
• E-commerce
• Space exploration
• Robotics
• Information extraction
• Social networks
• Debugging
If you want to predict the questions that will be asked in
your semester examinations , you can simply run a
machine learning algorithm with the previous years
questions as the input data, and then have fun.
Some other applications
Some popular books on Machine Learning :
Programming Collective Intelligence
- O’Reilly Media, Inc.
Machine Learning for Hackers
- O’Reilly Media, Inc.
References :
• Wikipedia - https://en.wikipedia.org/wiki/Machine_learning
• Book – Programming Collective Intelligence , O’Reilly Media, Inc.
An Introduction to Machine Learning - Key Concepts, Algorithms, and Applications

More Related Content

Viewers also liked

State of Drupal keynote, DrupalCon India
State of Drupal keynote, DrupalCon IndiaState of Drupal keynote, DrupalCon India
State of Drupal keynote, DrupalCon IndiaDries Buytaert
 
Customer Driven Products
Customer Driven ProductsCustomer Driven Products
Customer Driven ProductsKarl Seiler
 
Bahasa indonesa presentasi
Bahasa indonesa presentasiBahasa indonesa presentasi
Bahasa indonesa presentasiMillan_Dhillon
 
Geralda product catalogue
Geralda product catalogueGeralda product catalogue
Geralda product cataloguegeralda-candles
 
MotoGP Championship Quest Case Study
MotoGP Championship Quest Case StudyMotoGP Championship Quest Case Study
MotoGP Championship Quest Case StudyGraeme Warring
 
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...arhivkruf
 
Электронная выставка про архив
Электронная выставка про архивЭлектронная выставка про архив
Электронная выставка про архивarhivkruf
 
LAPORAN HASIL OBSERVASI
LAPORAN HASIL OBSERVASILAPORAN HASIL OBSERVASI
LAPORAN HASIL OBSERVASIMillan_Dhillon
 

Viewers also liked (13)

State of Drupal keynote, DrupalCon India
State of Drupal keynote, DrupalCon IndiaState of Drupal keynote, DrupalCon India
State of Drupal keynote, DrupalCon India
 
Customer Driven Products
Customer Driven ProductsCustomer Driven Products
Customer Driven Products
 
The Digital Revolution
The Digital RevolutionThe Digital Revolution
The Digital Revolution
 
Bahasa indonesa presentasi
Bahasa indonesa presentasiBahasa indonesa presentasi
Bahasa indonesa presentasi
 
Geralda product catalogue
Geralda product catalogueGeralda product catalogue
Geralda product catalogue
 
Anekdot
Anekdot Anekdot
Anekdot
 
BASUDEV- Aug,10
BASUDEV- Aug,10BASUDEV- Aug,10
BASUDEV- Aug,10
 
NEGOSIASI
NEGOSIASINEGOSIASI
NEGOSIASI
 
Kelompok 2 negosiasi
Kelompok 2 negosiasiKelompok 2 negosiasi
Kelompok 2 negosiasi
 
MotoGP Championship Quest Case Study
MotoGP Championship Quest Case StudyMotoGP Championship Quest Case Study
MotoGP Championship Quest Case Study
 
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...
Смирнова Татьяна Ивановна, Меньшикова Анастасия (5 «А» класс шк. № 3) - «О Со...
 
Электронная выставка про архив
Электронная выставка про архивЭлектронная выставка про архив
Электронная выставка про архив
 
LAPORAN HASIL OBSERVASI
LAPORAN HASIL OBSERVASILAPORAN HASIL OBSERVASI
LAPORAN HASIL OBSERVASI
 

Similar to An Introduction to Machine Learning - Key Concepts, Algorithms, and Applications

Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation SystemsRobin Reni
 
Recommendation Systems Roadtrip
Recommendation Systems RoadtripRecommendation Systems Roadtrip
Recommendation Systems RoadtripThe Real Dyl
 
Past, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspectivePast, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspectiveXavier Amatriain
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemMilind Gokhale
 
Machine learning session7(nb classifier k-nn)
Machine learning   session7(nb classifier k-nn)Machine learning   session7(nb classifier k-nn)
Machine learning session7(nb classifier k-nn)Abhimanyu Dwivedi
 
Recommender systems using collaborative filtering
Recommender systems using collaborative filteringRecommender systems using collaborative filtering
Recommender systems using collaborative filteringD Yogendra Rao
 
The Wisdom of the Few @SIGIR09
The Wisdom of the Few @SIGIR09The Wisdom of the Few @SIGIR09
The Wisdom of the Few @SIGIR09Xavier Amatriain
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceAmit Sharma
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender systemStanley Wang
 
Data science essentials in azure ml
Data science essentials in azure mlData science essentials in azure ml
Data science essentials in azure mlMostafa
 
Recommender systems
Recommender systemsRecommender systems
Recommender systemsTamer Rezk
 
The Effect of Correlation Coefficients on Communities of Recommenders
The Effect of Correlation Coefficients on Communities of RecommendersThe Effect of Correlation Coefficients on Communities of Recommenders
The Effect of Correlation Coefficients on Communities of RecommendersNeal Lathia
 
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...Alejandro Bellogin
 
Design Recommender systems from scratch
Design Recommender systems from scratchDesign Recommender systems from scratch
Design Recommender systems from scratchDr. Amit Sachan
 
UNIT 1 Machine Learning [KCS-055] (1).pptx
UNIT 1 Machine Learning [KCS-055] (1).pptxUNIT 1 Machine Learning [KCS-055] (1).pptx
UNIT 1 Machine Learning [KCS-055] (1).pptxRohanPathak30
 
Intro to machine learning
Intro to machine learningIntro to machine learning
Intro to machine learningAkshay Kanchan
 
Reasesrty djhjan S - explanation required.pptx
Reasesrty djhjan S - explanation required.pptxReasesrty djhjan S - explanation required.pptx
Reasesrty djhjan S - explanation required.pptxAnkitaVerma776806
 
Recommenders Systems
Recommenders SystemsRecommenders Systems
Recommenders SystemsTariq Hassan
 

Similar to An Introduction to Machine Learning - Key Concepts, Algorithms, and Applications (20)

Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
 
Recommendation Systems Roadtrip
Recommendation Systems RoadtripRecommendation Systems Roadtrip
Recommendation Systems Roadtrip
 
Past, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspectivePast, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspective
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
 
Machine learning session7(nb classifier k-nn)
Machine learning   session7(nb classifier k-nn)Machine learning   session7(nb classifier k-nn)
Machine learning session7(nb classifier k-nn)
 
Recommender systems using collaborative filtering
Recommender systems using collaborative filteringRecommender systems using collaborative filtering
Recommender systems using collaborative filtering
 
The Wisdom of the Few @SIGIR09
The Wisdom of the Few @SIGIR09The Wisdom of the Few @SIGIR09
The Wisdom of the Few @SIGIR09
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inference
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
Data science essentials in azure ml
Data science essentials in azure mlData science essentials in azure ml
Data science essentials in azure ml
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Machine learning
Machine learningMachine learning
Machine learning
 
The Effect of Correlation Coefficients on Communities of Recommenders
The Effect of Correlation Coefficients on Communities of RecommendersThe Effect of Correlation Coefficients on Communities of Recommenders
The Effect of Correlation Coefficients on Communities of Recommenders
 
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
 
Design Recommender systems from scratch
Design Recommender systems from scratchDesign Recommender systems from scratch
Design Recommender systems from scratch
 
UNIT 1 Machine Learning [KCS-055] (1).pptx
UNIT 1 Machine Learning [KCS-055] (1).pptxUNIT 1 Machine Learning [KCS-055] (1).pptx
UNIT 1 Machine Learning [KCS-055] (1).pptx
 
Intro to machine learning
Intro to machine learningIntro to machine learning
Intro to machine learning
 
Reasesrty djhjan S - explanation required.pptx
Reasesrty djhjan S - explanation required.pptxReasesrty djhjan S - explanation required.pptx
Reasesrty djhjan S - explanation required.pptx
 
Filtering content bbased crs
Filtering content bbased crsFiltering content bbased crs
Filtering content bbased crs
 
Recommenders Systems
Recommenders SystemsRecommenders Systems
Recommenders Systems
 

Recently uploaded

(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

An Introduction to Machine Learning - Key Concepts, Algorithms, and Applications

  • 1. { An Introduction to Machine Learning By : Avinash Kumar Saw Department of Information Technology IIEST Shibpur
  • 2. Table of Contents : • What is Machine Learning ? • How does it work ? • An example on Machine Learning • Why it is required ? • Various Machine learning algorithms - Collaborative filtering • Applications • References
  • 3. What is Machine Learning ? Machine Learning is subfield of Artificial Intelligence concerned with algorithms that allow computers to learn. It is the ability of a machine to improve its own performance through repetition and experience.
  • 4. “Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed.” – Arthur Samuel way back in 1959. “A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.” – Tom Mitchell, Carnegie Mellon University
  • 6. How does it work ? By implementing algorithms that can learn from and make predictions on data. Such algorithms operate by building a model from example inputs in order to make data-driven predictions or decisions, rather than following strictly static program instructions.
  • 7. Machine Learning algorithms are often categorized as : • Supervised machine learning : The program is “trained” on a pre-defined set of “training examples”, which then facilitate its ability to reach an accurate conclusion when given new data. • Unsupervised machine learning : The program is given a bunch of data and must find patterns and relationships therein.
  • 8. In the majority of supervised learning applications, the ultimate goal is to develop a finely tuned predictor function h(x) (sometimes called the “hypothesis”). A very simple predictor function can be of form : h(x) = θ0 + θ1 x where θ0 and θ1 are constants. Our goal is to find the perfect values of θ0 and θ1 to make our predictor work as well as possible.
  • 9. A simple machine learning example : Company employees satisfaction rating based on employee salary
  • 10. First we have to initialize our predictor h(x) with some reasonable values of θ0 and θ1 . Now our predictor looks like this when placed over our training set: h(x) = 12.00 + 0.20 x
  • 11. If we ask this predictor for the satisfaction of an employee making $60k, it would predict a rating of 24 , which is a terrible guess because the machine doesn’t know much.
  • 12. So now, let’s give this predictor all the salaries from our training set, then the predictor function may look like this : h(x) = 13.12 + 0.62 x
  • 13. If we repeat this process , say 1000 times, this will give us a better predictor function h(x) = 15.54 + 0.75 x
  • 14. Now if we ask the machine again for the satisfaction rating of the employee who makes $60k, it will predict a rating of roughly 60.
  • 15. Why it is required ? • To deal with complex real world problems. • To produce models that can analyse bigger, more complex data and deliver faster, more accurate results – even on a very large scale. • Machine Learning solves problems that cannot be solved by numerical means alone.
  • 16. This is possible because of : • More cheaper and powerful computational processing available these days. • Growing volumes and varieties of available data. • Affordable data storage.
  • 17. Some Machine Learning algorithms : • Collaborative filtering • Decision Tree learning • Artificial neural networks • Clustering • Genetic algorithm • Inductive logic programming • Similarity and metric learning • Bayesian networks
  • 18. Collaborative filtering : A technique used by some recommender systems. Also called social filtering , because it filters information based on the recommendations of other people. Used by online shopping sites like Amazon , like suggesting products to the users or recommending an item to the user based on the information collected from them.
  • 19. An example of collaborative filtering : Suppose , you want a recommendation of a movie from your friends. But your friends may not have the same “taste” in movies as yours. As more and more options become available, it becomes less practical to decide what you want by asking a small group of people, since they may not be aware of all the options. This is why a set of techniques called collaborative filtering was developed. The algorithm consists of : • Collecting the preferences • Finding similar user - 1. Euclidean Distance Score 2. Pearson Correlation Score • Ranking the critic • Recommending items
  • 20. Collecting preferences : Collect the preferences from your friends , ie , the rating given by them to different movies and store them in a dictionary(in python) or a Map(in C++) # A dictionary of movie critics and their ratings of a small set of movies Critics = {‘Ranjan': {‘Dabang': 2.5, ‘Tashan': 3.5, 'Just My Luck': 3.0, 'Superman Returns': 3.5, ‘Dilwale': 1.5, 'The Night Listener': 3.0}, ‘Govind': {' Dabang ': 3.0, ' Tashan ': 3.5, 'Just My Luck': 1.5, 'Superman Returns': 5.0, 'The Night Listener': 3.0, ' Dilwale': 3.5}, ‘Shankul': {' Dabang ': 4.5, ' Tashan ': 3.0, 'Superman Returns': 3.5, 'The Night Listener': 4.0}, ‘Ashish': {' Tashan ': 3.5, 'Just My Luck': 3.0, 'The Night Listener': 4.5, 'Superman Returns': 4.0, ' Dilwale ': 2.5}, ‘Niraj': {' Dabang ': 3.0, ' Tashan ': 4.0, 'Just My Luck': 2.0, 'Superman Returns': 3.0, 'The Night Listener': 3.0, ' Dilwale ': 2.0}, ‘Shubham': {' Dabang ': 3.0, ' Tashan ': 4.0, 'The Night Listener': 3.0, 'Superman Returns': 5.0, ' Dilwale ': 3.5}, ‘Manish': {' Tashan ':4.5,' Dilwale ':1.0,'Superman Returns':4.0}}
  • 21. Finding similar users : • Determine how similar people are in their tastes. • Compare each person with every other person and calculate a similarity score. • Two ways to do this : Euclidean distance and Pearson correlation.
  • 22. Euclidean Distance Score : people in preference space Dabang 5 Manish 4 Shankul Shubham 3 Niraj Govind 2 Ranjan 1 0 Dilwale 1 2 3 4 5
  • 23. Calculate the Euclidean distance between every pair of points. For eg , to calculate the Euclidean distance between Manish and Niraj : float euclid_distance = sqrt( pow(4.5 – 3, 2) + pow(3 – 2, 2) ) This formula calculates the distance, which will be smaller for people who are more similar. However, you need a function that gives higher values for people who are similar. This can be done by adding 1 to the function (to prevent a division-by zero error) and inverting it: float req _dist = 1/(euclid_distance + 1) So now, the req_dist will give values between 0 and 1. A value close to 1 will indicate that the two person’s tastes are similar , ie, they have identical preferences.
  • 24. #Returns a distance-based similarity score for person1 and person2 def similarity(prefs,person1,person2): # Get the list of shared_items si={ } for item in prefs[person1]: if item in prefs[person2]: si[item]=1 # if they have no ratings in common, return 0 if len(si)==0 : return 0 # Add up the squares of all the differences sum_of_squares = sum([pow(prefs[person1][item] - prefs[person2][item],2) for item in prefs[person1] if item in prefs[person2]]) return 1/(1+sum_of_squares)
  • 25. Ranking the critics : Score everyone against a given person and finds the closest matches. In this case, you’re interested in learning which movie critics have tastes similar to you so that you know whose advice you should take when deciding on a movie. # Returns the best matches for person from the prefs dictionary. # Number of results and similarity function are optional params. def topMatches(prefs, person, n=7, similarity=req_dist): scores=[(similarity(prefs, person, other), other) for other in prefs if other!=person] # Sort the list so the highest scores appear at the top scores.sort( ) scores.reverse( ) return scores[0:n]
  • 26. Recommending items : Critic Similarity Govind 0.99 Ranjan 0.98 Shankul 0.92 Manish 0.85 Ashish 0.96 Shubham 0.88 Niraj 0.84 This table suggests that you should take Govind’s advice on what movie to watch.
  • 27. Applications Few examples of machine learning applications that you may be familiar with : • The self-driving Google car. • Search engines • Online recommendation offers like those from Amazon and Netflix - Machine learning applications for everyday life. • Facebook's News Feed uses machine learning to personalize each member's feed. • Knowing what customers are saying about you on Twitter - Machine learning combined with linguistic rule creation.
  • 28. Applications of Machine Learning in various domains : • Web search • Computational biology • Finance • E-commerce • Space exploration • Robotics • Information extraction • Social networks • Debugging
  • 29. If you want to predict the questions that will be asked in your semester examinations , you can simply run a machine learning algorithm with the previous years questions as the input data, and then have fun. Some other applications
  • 30. Some popular books on Machine Learning : Programming Collective Intelligence - O’Reilly Media, Inc. Machine Learning for Hackers - O’Reilly Media, Inc.
  • 31. References : • Wikipedia - https://en.wikipedia.org/wiki/Machine_learning • Book – Programming Collective Intelligence , O’Reilly Media, Inc.