Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
10 views

Intro To Machine Learning

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Intro To Machine Learning

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Machine

Learning
Prepared By Dr. Adedotun Adetunla
Outlines
• What is machine Learning
• Types of Machine Learning
• Various algorithm of Machine Learning
Life without machine learning

Life with Machine Learning


Definition
• Machine Learning (ML) is the study of computer algorithms that improve automatically through
experience.

• The goal of machine learning is to develop methods that can automatically detect patterns in data,
and then to use the uncovered patterns to predict future data or other outcomes of interest.
Types of Machine Learning problems
1. Supervised Learning. Example” distinguish photos of cats from photos of dogs
2. Unsupervised Learning. Example: Imagine the same images but you don’t have a label on them. If you want
the program to figure out that there are two different types of animals (cat and dog )
3. Reinforcement Learning. Where the program is like an agent that makes prediction and generate the correct
answer based on feedbacks. Example, Imagine putting a burning candle Infront of a new born baby who
doesn’t know that touching the flame can get him/her burnt.
Supervised Learning

Unsupervised Learning
Reinforcement Learning

Difference Between Supervised and Unsupervised Learning


Machine Learning Solutions
1. Classification Algorithm, which falls under supervised learning. Classification is used when the
output you are looking for is a Yes or NO (Or in the form, A or B. Or True or False). The algorithm
that falls under classification are
➢ Decision Tree
➢ Naïve Bayes
➢ Random Forest
➢ KNN (K-nearest neighbors algorithm)
2. Regression: When the predicted data is numerically related. Such as if the stock keeper want to
predict the price of a product based on demands. The algorithm used is
➢ Linear Regression
3. Clustering is a type of unsupervised learning that is used when the data have to be organised to find
patterns in the case of “product recommendation”. Another application of clustering is in search
engines, which studies search history to figure out your preferences and provides you the best
search result. Algorithms used
➢K mean
Machine Learning Algorithms
K Nearest Neighbors

• K Nearest Neighbors algorightm works in a way that a new data point is assigned to a neighboring group it is most similar
to.

• In K Nearest Neighbors, K can be an integer greater than 1. So, for every new data point we want to classify, we compute to
which neighbouring group it is closest to.

For Example,
Linear Regression
Linear regression analysis is used to predict the value of a variable based on
the value of another variable.
For example, Let’s look at these values to have a relation between X and Y.

• X = -1, 0, 1, 2, 3, 4

• Y = -3, -1, 1, 3, 5, 7

Equation Y = mX + b, (Where “m” is the slope and “b” is the Y-intercept)

Example: Write a linear equation that best fits the data in the table shown, using least square method.
X 1 2 3 4 5 6 7
Y 1.5 3.8 6.7 9.0 11.2 13.6 16

Using Machine learning Regression algorithm, predict exactly the value of Y when X is 16?.
Decision
Tree
A decision tree is a graph that uses a
branching method to illustrate every
possible outcome of a decision.

Question: What condition/decision must be met for someone to


stay indoor?
Naïve Bayes Algorithm
The Naïve Bayes Classifier technique is based on conditional probability and is
particularly suited when the complexity of the inputs is high.

Example 1. Predict if a mal is spam or not?

Bayes Theorem, P(C/A) = [P(A/C) P(C)]/ P(A)

Example 2. Determine on which day to play cricket?


Exercise 1.
8 Instances, with four attributes and 2 outcomes.
First we need to estimate the conditional probabilities of each attributes (Color, bumbum,
height, hair) for the species classes: (M,F) using the data given in the table.
Using the probabilities estimate the probability values for the new instance – (Color= Green,
bumbum = big, height= Tall, Nail =Artificial.
No Color Bumbum Height Nail Species
1 White Big Short Artificial M

2 Green Small Tall Natural M


3 Green Small Short Artifical M
4 White Big Short Artificial M
5 Green Small Short Natural F
6 White Big Tall Natural F
7 White Big Tall Natural F
8 White Small Short Artificial F
Exercise 2.
Using the Naïve Bayes Algorithm, what should I do in this instance (Outlook
=sunny, Temperature =cool, Humidity = high, Wind= Strong)?.
Day Outlook Temperature Humidity Wind Make Love
D1 Sunny Hot High Weak No
D2 Sunny Hot High Strong No
D3 Overcast Hot High Weak Yes
D4 Rain Mild High Weak Yes
D5 Rain Cool Normal Weak Yes
D6 Rain Cool Normal Strong No
D7 Overcast Cool Normal Strong Yes
D8 Sunny Mild High Weak No
D9 Sunny Cool Normal Weak Yes
D10 Rain Mild Normal Weak Yes
D11 Sunny Mild Normal Strong Yes
D12 Overcast Mild High Strong Yes
D13 Overcast Hot Normal Weak Yes
D14 Rain Mild High Strong No

You might also like