Types Of Machine Learning | Machine Learning Algorithms | Machine Learning Tutorial | Simplilearn

Simplilearn
3 Nov 202021:08

Summary

TLDRIn this tutorial from Simply Learn, Anirban explores the fascinating world of machine learning, a technology that permeates our daily lives more than we realize. He contrasts life without and with machine learning, highlighting its applications in search engines, facial recognition, virtual reality, and recommendation systems. The video delves into machine learning's three types: supervised, unsupervised, and reinforcement learning, each with its unique approach to learning from data. Anirban also discusses how to select the right machine learning solution based on problem statements, data characteristics, and complexity. The tutorial concludes with an overview of four key algorithms: k-Nearest Neighbor, Linear Regression, Decision Tree, and Naive Bayes, illustrating their workings with relatable examples.

Takeaways

  • ๐ŸŒ Machine learning is a significant topic in technology, impacting various aspects of daily life.
  • ๐Ÿ” Without machine learning, tasks like searching for information or facial recognition would be much more difficult.
  • ๐ŸŽฎ Machine learning enhances gaming experiences through virtual reality and gesture control, adapting to player strategies.
  • ๐Ÿ›’ Amazon uses machine learning for product recommendations, dynamic pricing, and customer segmentation.
  • ๐Ÿš– Uber and similar apps use machine learning to predict destinations and optimize routes based on traffic and other factors.
  • ๐Ÿค– Machine learning is a subset of artificial intelligence that enables systems to learn and improve from experience without explicit programming.
  • ๐Ÿ“Š There are three main types of machine learning: supervised, unsupervised, and reinforcement learning, each with distinct use cases and methodologies.
  • ๐Ÿซ Supervised learning requires labeled data and is used for tasks like spam filtering, while unsupervised learning finds patterns in unlabeled data, useful for recommendation systems.
  • ๐Ÿ”„ Reinforcement learning operates through trial and error, learning from feedback to improve performance, commonly used in gaming for adaptive difficulty.
  • ๐Ÿ›  The choice of machine learning solution depends on the problem statement, data characteristics, and the complexity of the task at hand.
  • โš™๏ธ Key algorithms in machine learning include k-nearest neighbors for classification, linear regression for establishing relationships, decision trees for branching decisions, and naive Bayes for probabilistic predictions.

Q & A

  • What is the main topic of the tutorial provided by Anirban from Simply Learn?

    -The main topic of the tutorial is machine learning, focusing on its applications, types, and algorithms.

  • How does the tutorial describe the impact of machine learning on daily life?

    -The tutorial illustrates the impact of machine learning on daily life by discussing how it simplifies tasks like searching information on Google, facial recognition on social media, and virtual reality in gaming.

  • What are some examples given in the tutorial where machine learning is used in gaming?

    -The tutorial mentions the use of virtual reality glasses for immersive gaming, gesture control gaming, and adaptive AI opponents in games like FIFA.

  • How does Amazon use machine learning according to the tutorial?

    -Amazon uses machine learning for product recommendations, dynamic pricing based on demand, and customer segmentation to cater to customer needs more effectively.

  • What is the definition of machine learning provided in the tutorial?

    -Machine learning is defined as an application of artificial intelligence that enables systems to learn from experience and improve without being explicitly programmed.

  • What are the three primary types of machine learning discussed in the tutorial?

    -The three primary types of machine learning are supervised learning, unsupervised learning, and reinforcement learning.

  • How does supervised learning work as explained in the tutorial?

    -Supervised learning works by training a model with labeled data, where the system learns from the labeled examples and applies this knowledge to make predictions on new, unseen data.

  • What is the difference between supervised and unsupervised learning according to the tutorial?

    -Supervised learning uses labeled data and provides feedback for predictions, while unsupervised learning works with unlabeled data to discover patterns and does not involve feedback for predictions.

  • What are some factors that influence the selection of a machine learning solution as mentioned in the tutorial?

    -The factors that influence the selection of a machine learning solution include the problem statement, the size, quality, and nature of the data, and the complexity of the solution.

  • Can you provide an example of how the k-nearest neighbors (KNN) algorithm works as described in the tutorial?

    -The tutorial explains KNN with an example of classifying a new data point based on its proximity to known data points. If the new data point is closer to a cluster of tennis balls, it is classified as a tennis ball.

  • What is the purpose of the linear regression algorithm as discussed in the tutorial?

    -The purpose of the linear regression algorithm is to establish a linear relationship between variables to predict numerical values, such as predicting a person's weight based on their height.

Outlines

00:00

๐ŸŽ“ Introduction to Machine Learning

In this introductory section, the speaker Anirban from Simply Learn provides an overview of the tutorial's agenda on machine learning, a hot topic in the tech world. The video is aimed at both beginners and those with basic knowledge, promising to cover the essentials, applications, and advanced concepts of machine learning. The section also emphasizes the significance of understanding machine learning's impact on daily life and its prevalence across various sectors.

05:01

๐Ÿค” Life Without Machine Learning

This paragraph explores the challenges of a world without machine learning, highlighting how deeply integrated it is in our daily lives. Examples include Google search, facial recognition on social media platforms, and virtual assistants like Siri and Cortana. The speaker underscores how machine learning simplifies complex tasks, such as information retrieval and photo tagging, making life significantly easier compared to a few years ago.

10:02

๐ŸŽฎ Life With Machine Learning

Here, the video delves into specific examples of machine learning's influence on modern life. It touches on the gaming industry's advancements, such as virtual reality and gesture control, as well as e-commerce platforms like Amazon, which use machine learning for recommendation systems, dynamic pricing, and customer segmentation. The paragraph illustrates how machine learning enhances user experience across different domains, including ride-sharing apps like Uber.

15:04

๐Ÿง  Understanding Machine Learning

This paragraph introduces the core concept of machine learning, describing it as a form of artificial intelligence that enables systems to learn and improve from experience without explicit programming. The speaker uses simple analogies to explain how machine learning works, such as a system analyzing data to identify and categorize different types of fruits, thereby demonstrating the basic learning and prediction process.

20:05

๐Ÿ“š Types of Machine Learning

The speaker categorizes machine learning into three primary types: supervised, unsupervised, and reinforcement learning. Supervised learning involves training a model with labeled data, unsupervised learning deals with unstructured data without labels, and reinforcement learning focuses on systems learning from feedback. Each type is explained with clear examples, helping the audience understand their distinct characteristics and applications.

โš–๏ธ Choosing the Right Machine Learning Solution

This section emphasizes the importance of selecting the appropriate machine learning model based on factors such as the problem statement, data quality, and complexity. The speaker advises caution in choosing between supervised, unsupervised, and reinforcement learning models to avoid inefficiencies in time, energy, and cost. The explanation is tailored to help viewers grasp the considerations involved in building effective machine learning solutions.

๐Ÿ” Key Machine Learning Algorithms

In this paragraph, the speaker introduces various algorithms used in machine learning, categorizing them into classification, regression, and clustering. Classification algorithms, like decision trees and logistic regression, are used for binary outcomes, while regression is for predicting numerical values. Clustering is explained as a method for organizing data, commonly used in recommendation systems and search engines. The speaker provides examples to make these concepts more relatable.

๐Ÿ“Š Detailed Overview of Four Algorithms

The speaker provides an in-depth look at four widely used machine learning algorithms: K-nearest neighbor (KNN), linear regression, decision tree, and naive Bayes. KNN is explained with a practical example involving the classification of sports balls. Linear regression is described through its application in predicting relationships between variables, like height and weight. The decision tree is illustrated with a real-life scenario of making decisions based on conditions, while naive Bayes is discussed in the context of spam mail filtering.

๐Ÿ Conclusion and Call to Action

The final paragraph wraps up the video by encouraging viewers to apply the concepts learned and engage with the content by asking questions and providing feedback. The speaker also promotes subscribing to the Simply Learn YouTube channel for more educational videos on technology topics, inviting viewers to continue learning and stay updated with new content.

Mindmap

Keywords

๐Ÿ’กMachine Learning

Machine learning is a subset of artificial intelligence that enables systems to learn from data, identify patterns, and make decisions with minimal human intervention. In the video, it's portrayed as a transformative technology that enhances daily life by automating tasks and providing personalized experiences. Examples include Google search results, facial recognition on social media, and recommendation systems on e-commerce platforms.

๐Ÿ’กArtificial Intelligence (AI)

Artificial Intelligence refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The video uses AI as an umbrella term, under which machine learning operates, providing systems with the ability to learn and improve from experience without being explicitly programmed.

๐Ÿ’กSupervised Learning

Supervised learning is a type of machine learning where the model is trained on labeled data, meaning the training data includes both the input and the desired output. The video explains how it's used for tasks like spam filtering, where the system learns from labeled examples (spam or not spam) to predict the category of new emails.

๐Ÿ’กUnsupervised Learning

Unsupervised learning involves training algorithms on data without labeled responses. The system is tasked with finding patterns and structures within the data. The video uses the example of a recommendation system, like those on Amazon, which groups products based on similarities without prior labels.

๐Ÿ’กReinforcement Learning

Reinforcement learning is a type of machine learning where an agent learns to make decisions by taking actions in an environment to maximize some notion of cumulative reward. The video likens it to a baby learning not to touch a flame, where the system learns from feedback to improve its predictions over time, as seen in adaptive video game AI.

๐Ÿ’กAlgorithms

In the context of the video, algorithms are the methods or processes that machine learning models use to perform tasks. They are the building blocks of machine learning, with different algorithms suited for different types of problems, such as classification, regression, and clustering.

๐Ÿ’กClassification

Classification is a type of supervised learning where the algorithm determines the category or class of an entity based on its features. The video provides an example of a shopkeeper using a classification algorithm to predict whether a customer will return to the store.

๐Ÿ’กRegression

Regression is a type of predictive modeling technique that estimates the relationship between variables. In the video, it's used to predict numerical values, such as the price of a product based on its demand, with the example of predicting a person's weight based on their height.

๐Ÿ’กClustering

Clustering is an unsupervised learning technique used for grouping a set of objects in such a way that objects in the same group are more similar to each other than to those in other groups. The video mentions its use in recommendation systems and search engines to organize data and provide personalized results.

๐Ÿ’กK-Nearest Neighbors (KNN)

K-Nearest Neighbors is a simple, supervised learning algorithm that classifies a data point based on the majority vote of its neighbors, with the 'k' determining the number of neighbors considered. The video uses a sports ball example to illustrate how KNN might classify an unknown ball based on its proximity to known balls in a feature space.

๐Ÿ’กDecision Tree

A decision tree is a flowchart-like structure in which each internal node represents a feature, each branch represents a decision rule, and each leaf node represents an outcome. The video explains it as a branching method that mirrors human decision-making, such as deciding whether to go swimming based on the weather.

๐Ÿ’กNaive Bayes

Naive Bayes is a classification technique based on applying Bayes' theorem with the assumption of independence between every pair of features. The video uses it to illustrate spam email filtering and decision-making under uncertainty, like predicting the likelihood of playing cricket based on weather conditions.

Highlights

Introduction to the tutorial on machine learning by Anirban from Simply Learn.

Machine learning's role in making everyday tasks easier, such as information search and facial recognition.

The impact of machine learning on gaming with virtual reality and gesture control.

How machine learning enhances the e-commerce experience through recommendation systems and dynamic pricing.

The application of machine learning in ride-sharing apps like Uber for route optimization.

Definition of machine learning as a subset of artificial intelligence that enables systems to learn from experience.

Explanation of how machine learning works with an example of fruit classification.

Types of machine learning: Supervised, Unsupervised, and Reinforcement Learning.

Supervised learning explained through the training of a model with labeled data.

Unsupervised learning demonstrated by clustering data without labels.

Reinforcement learning compared to a baby learning from touching a flame.

The importance of selecting the right machine learning solution based on the problem statement, data nature, and complexity.

Classification, Regression, and Clustering as key methods in machine learning.

K-Nearest Neighbors algorithm explained with a sports ball classification example.

Linear Regression algorithm used for predicting relationships between variables.

Decision Tree algorithm using a branching method for decision-making.

Naive Bayes algorithm utilizing conditional probability for large data set predictions.

Conclusion of the tutorial with a call to action for feedback and further learning.

Transcripts

play00:00

hi guys i'm anirban from simply learn

play00:02

and today i will be giving you a

play00:03

tutorial on one of the most talked about

play00:05

topics in the world of technology and

play00:08

that is machine learning

play00:10

i'm sure that if you are watching this

play00:12

video you must have heard about machine

play00:14

learning somewhere or the other and yes

play00:16

it is quite an intriguing topic

play00:18

this video will act as a supplement for

play00:20

the ones who know the basics of machine

play00:22

learning and are aware of where it is

play00:24

being used and how it is being used for

play00:26

the ones who are completely new to this

play00:29

you don't have to worry

play00:30

we will be brushing up the basics as

play00:32

well

play00:33

so to start off with let's have a look

play00:34

at the agenda

play00:36

first we'll look into a life without

play00:38

machine learning

play00:39

then we'll move into a life with machine

play00:41

learning

play00:42

then we'll try to understand what is

play00:44

machine learning actually

play00:46

then we look into the types of machine

play00:48

learning we'll talk about the right

play00:50

machine learning solutions

play00:52

then we'll move into the different

play00:54

algorithms that machine learning has

play00:56

let's talk about a life without machine

play00:58

learning

play01:00

for someone who doesn't know anything

play01:02

about machine learning or artificial

play01:04

intelligence he or she might think that

play01:06

it is only being used in robots or

play01:07

machines and stuff which is actually

play01:10

true as ported by most of the sci-fi

play01:11

movies nowadays

play01:13

but you wouldn't believe how much more

play01:15

machine learning is giving us how much

play01:16

of it we are using in our daily lives

play01:19

let's say you need information on any

play01:21

random topic say a computer

play01:24

the first place you would check would

play01:26

definitely be google right

play01:27

it would collect all the information on

play01:29

the word you search for and present it

play01:31

to you according to relevance if there

play01:33

was no google you would have to do it in

play01:35

a very hard way that is by going through

play01:37

tens or hundreds of books and articles

play01:39

even after which you won't find the

play01:41

answer

play01:42

if we go back four to five years facial

play01:45

recognition would be a thing only showed

play01:47

in movies like mission impossible or

play01:49

terminator or any of the sci-fi movies

play01:51

you pick

play01:52

but machine learning has made it

play01:54

possible for facebook and instagram to

play01:56

use this feature for your benefits you

play01:58

don't have to go through the trouble of

play02:00

tagging every single person present in a

play02:01

picture that you have posted

play02:03

facebook will automatically recognize

play02:05

the people in the photo and tag them for

play02:08

you

play02:09

that saves a lot of time for you doesn't

play02:10

it

play02:11

also siri cortana iris all of them would

play02:15

not be there to help you if there was no

play02:17

machine learning

play02:20

now that we know life would be a lot

play02:22

more difficult without machine learning

play02:24

let's look into the things that are run

play02:26

by machine learning and we are using

play02:28

them on our daily basis

play02:30

let's enter the world of gaming ps4s and

play02:33

xboxes have introduced virtual reality

play02:35

glasses which brings a whole new level

play02:37

of detail into gaming

play02:39

every time your head moves in real world

play02:41

it replicates the movement in the

play02:43

virtual world providing an excellent

play02:45

gaming experience

play02:47

then there is gesture control gaming

play02:49

where in machine learning tracks your

play02:50

body movement and makes a corresponding

play02:52

movement in the game

play02:54

finally in the game fifa your opponent

play02:57

tends to adapt based on the kind of

play02:58

strategy or gameplay you follow

play03:01

that is again done by machine learning

play03:04

i'm sure you must have shopped a lot

play03:06

from amazon so let's look into some of

play03:08

the places amazon makes use of machine

play03:10

learning

play03:11

let's say you buy a formal t-shirt on

play03:14

amazon now as you buy it it suggests you

play03:17

formal shoes ties blazers and apparels

play03:20

that go with what you have bought

play03:22

that's the recommendation system powered

play03:24

by machine learning again

play03:25

the price on every product that you see

play03:27

on amazon is varying every moment based

play03:29

on demand

play03:31

that's being done by machine learning

play03:32

algorithms

play03:34

then comes customer segmentation

play03:36

customer segmentation is one of the most

play03:38

crucial thing for all the e-commerce

play03:40

platforms machine learning helps them

play03:42

differentiate between customers based on

play03:44

what they buy how frequent are they and

play03:46

their reviews

play03:48

this helps the companies to make sure

play03:50

that their customers are taken care of

play03:52

and the needs are being fulfilled

play03:56

now let's talk about an app

play03:58

that you use on a daily basis to reach

play04:00

office on time

play04:02

yes it's uber gaps once you have

play04:04

traveled with uber you must have noticed

play04:07

that it suggests you the places you

play04:09

might want to go based on your previous

play04:10

journeys when you are taking a share how

play04:13

does the app make sure that the cab you

play04:14

get is travelled by the same route you

play04:16

want to travel in

play04:18

there are so many factors like the

play04:19

distance the traffic the ratings all of

play04:22

it is taken care of by machine learning

play04:25

for the past five minutes we have been

play04:27

talking about how machine learning is

play04:28

improving our lives where all it is

play04:30

being used i have probably said machine

play04:33

learning 100 times already

play04:35

i think it's about time that i tell you

play04:37

what machine learning actually is

play04:40

let's take an ordinary system that you

play04:42

currently are using it can't do much

play04:44

except from the basic operations that

play04:45

you already know about

play04:47

now

play04:48

let's add artificial intelligence or for

play04:50

a layman's point of view let's give the

play04:52

same machine the power to think on its

play04:54

own

play04:54

that is what machine learning basically

play04:56

is

play04:57

it's an application of artificial

play04:59

intelligence that provides systems the

play05:01

ability to learn on their own and

play05:03

improve from experience without being

play05:04

programmed externally

play05:06

so if your computer had machine learning

play05:09

may be able to play the difficult parts

play05:11

of a game for you or probably solve a

play05:13

complicated mathematical equation for

play05:14

you

play05:15

that could be really helpful

play05:17

let's dive in a little deeper and see

play05:19

how machine learning works

play05:21

let's say you provide a system with the

play05:22

input data that carries the photos of

play05:24

various kinds of fruits now you want the

play05:27

system to figure out what are the

play05:28

different fruits and group them

play05:30

accordingly so what the system does it

play05:32

analyzes the input data

play05:34

then it tries to find patterns patterns

play05:37

like shapes size and color

play05:40

based on these patterns the system will

play05:43

try to predict the different types of

play05:44

fruit and segregate them

play05:46

finally it keeps track of all such

play05:49

decisions it took in the process to make

play05:51

sure it's learning the next time you ask

play05:53

the same system to predict and segregate

play05:56

the different types of fruits

play05:58

it won't have to go through the entire

play05:59

process again

play06:00

that's how machine learning works

play06:03

now let's look into the types of machine

play06:06

learning

play06:07

machine learning is primarily of three

play06:09

types first one is supervised machine

play06:11

learning as the name suggests you have

play06:13

to supervise your machine learning while

play06:15

you train it to work on its own it

play06:17

requires labeled training data

play06:19

next up is unsupervised learning wherein

play06:22

there will be training data but it won't

play06:24

be labeled

play06:26

finally there's reinforcement learning

play06:28

wherein the system learns on its own

play06:30

let's talk about all these types in

play06:32

detail

play06:33

let's try to understand how supervised

play06:35

learning works look at the pictures very

play06:37

very carefully the monitor depicts the

play06:39

model or the system that we are going to

play06:42

train

play06:43

this is how the training is done

play06:45

we provide a data set that contains

play06:47

pictures of a kind of a fruit say an

play06:49

apple

play06:50

then we provide another data set which

play06:52

lets the model know that these pictures

play06:55

were that of a fruit called apple

play06:57

this ends the training phase

play07:00

now

play07:00

what we will do is we provide a new set

play07:03

of data which only contains pictures of

play07:05

apple

play07:06

now here comes the fun part the system

play07:08

can actually tell you what fruit it is

play07:11

and it will remember this and apply this

play07:13

knowledge in future as well that's how

play07:16

supervised learning works you are

play07:18

training the model to do a certain kind

play07:19

of an operation on its own

play07:22

this kind of a model is generally used

play07:23

into filtering spam mails from your

play07:25

email accounts as well

play07:27

yes

play07:27

surprise aren't you

play07:29

so let's move on to unsupervised

play07:31

learning now let's say we have a data

play07:33

set which is cluttered in this case we

play07:36

have a collection of pictures of

play07:37

different fruits we feed this data to

play07:39

the model and the model analyzes the

play07:41

data to figure out patterns in it

play07:43

in the end it categorizes the photos

play07:45

into three types as you can see in the

play07:47

image based on their similarities

play07:50

so you provide the data to the system

play07:52

and let the system do the rest of the

play07:53

work simple isn't it

play07:55

this kind of a model is used by flipkart

play07:58

to figure out the products that are well

play08:00

suited for you

play08:01

honestly speaking this is my favorite

play08:03

type of machine learning out of all the

play08:05

three and this type has been widely

play08:08

shown in most of the sci-fi movies

play08:09

lately

play08:10

let's find out how it works

play08:12

imagine a newborn baby

play08:14

you put a burning candle in front of the

play08:16

baby

play08:17

the baby does not know that if it

play08:18

touches the flame its fingers might get

play08:20

burned

play08:21

so it does that anyway and gets hurt

play08:24

the next time you put that candle in

play08:26

front of the baby it will remember what

play08:28

happened the last time and would not

play08:30

repeat what it did

play08:31

that's exactly how reinforcement

play08:33

learning works

play08:34

we provide the machine with a data set

play08:37

wherein we ask it to identify a

play08:39

particular kind of a fruit in this case

play08:41

an apple

play08:42

so what it does as a response it tells

play08:44

us that it's a mango

play08:46

but as we all know it's a completely

play08:48

wrong answer so as a feedback we tell

play08:50

the system that it's wrong it's not a

play08:52

mango it's an apple what it does it

play08:55

learns from the feedback and keeps that

play08:56

in mind

play08:58

when the next time when we ask a same

play09:00

question it gives us the right answer it

play09:03

is able to tell us that it's actually an

play09:04

apple that is a reinforced response so

play09:07

that's how reinforcement learning works

play09:10

it learns from its mistakes and

play09:11

experiences

play09:13

this model is used in games like prince

play09:15

of persia or assassin's creed or fifa

play09:17

wherein the level of difficulty

play09:19

increases as you get better with the

play09:20

games just to make it more clear for you

play09:23

let's look at a comparison between

play09:25

supervised and unsupervised learning

play09:27

firstly the data involved in case of

play09:29

supervised learning is labeled as we

play09:32

mentioned in the examples previously

play09:34

we provide the system with a photo of an

play09:37

apple and let the system know that this

play09:39

is actually an apple

play09:40

that is called label data so the system

play09:43

learns from the label data and makes

play09:45

future predictions

play09:47

now unsupervised learning does not

play09:49

require any kind of label data because

play09:51

its work is to look for patterns in the

play09:54

input data and organize it

play09:57

the next point is that you get a

play09:59

feedback in case of supervised learning

play10:02

that is once you get the output the

play10:04

system tends to remember that and uses

play10:06

it for the next operation

play10:08

that does not happen for unsupervised

play10:10

learning

play10:10

and the last point is that supervised

play10:12

learning is mostly used to predict data

play10:15

whereas unsupervised learning is used to

play10:17

find out hidden patterns or structures

play10:19

in data

play10:20

i think this would have made a lot of

play10:22

things clear for you regarding

play10:23

supervised and unsupervised learning

play10:26

now let's talk about a question that

play10:28

everyone needs to answer before building

play10:29

a machine learning model

play10:31

what kind of a machine learning solution

play10:33

should we use

play10:35

yes you should be very careful with

play10:37

selecting the right kind of solution for

play10:38

your model because if you don't you

play10:41

might end up losing a lot of time energy

play10:43

and processing cost

play10:45

i won't be naming the actual solutions

play10:47

because you guys aren't familiar with

play10:48

them yet

play10:49

so we will be looking at it based on

play10:51

supervised unsupervised and

play10:53

reinforcement learning

play10:55

so let's look into the factors that

play10:57

might help us select the right kind of

play10:58

machine learning solution

play11:00

first factor is the problem statement

play11:02

describes the kind of model you will be

play11:04

building or as the name suggests it

play11:06

tells you what the problem is

play11:08

for example let's say the problem is to

play11:11

predict the future stock market prices

play11:13

so for anyone who is new to machine

play11:15

learning would have trouble figuring out

play11:16

the right solution

play11:18

but with time and practice you will

play11:21

understand that for a problem statement

play11:22

like this

play11:23

solution based on supervised learning

play11:25

would work the best for obvious reasons

play11:28

then comes the size quality and nature

play11:31

of the data if the data is cluttered you

play11:34

go for unsupervised if the data is very

play11:36

large and categorical we normally go for

play11:39

supervised learning solutions

play11:41

finally we choose the solution based on

play11:43

their complexity

play11:45

as for the problem statement wherein we

play11:47

predict the stock market prices it can

play11:49

also be solved by using reinforcement

play11:51

learning

play11:52

but that would be very very difficult

play11:54

and time consuming unlike supervised

play11:56

learning

play11:58

algorithms are not types of machine

play12:00

learning

play12:01

in the most simplest language they are

play12:03

methods of solving a particular problem

play12:06

so the first kind of method is

play12:07

classification which falls under

play12:10

supervised learning

play12:11

classification is used when the output

play12:13

you are looking for is a yes or no or in

play12:16

the form a or b or true or false like if

play12:20

a shopkeeper wants to predict if a

play12:21

particular customer will come back to

play12:23

his shop or not he will use a

play12:25

classification algorithm

play12:28

the algorithms that fall under

play12:29

classification are decision tree knife

play12:32

base random forest logistic regression

play12:35

and

play12:36

knn the next kind is regression

play12:40

this kind of a method is used when the

play12:42

predicted data is numerical in nature

play12:45

like if the shopkeeper wants to predict

play12:47

the price of a product based on its

play12:49

demand it would go for regression the

play12:52

last method is clustering

play12:54

clustering is a kind of unsupervised

play12:56

learning again it is used when the data

play12:59

needs to be organized

play13:01

most of the recommendation system used

play13:02

by flipkart amazon etc make use of

play13:05

clustering

play13:07

another major application of it is in

play13:09

search engines the search engines study

play13:11

your old search history to figure out

play13:13

your preferences and provide you the

play13:15

best search results

play13:18

one of the algorithms that fall under

play13:19

clustering is k-means

play13:23

now that we know the various algorithms

play13:25

let's look into four key algorithms that

play13:27

are used widely

play13:29

we will understand them with very simple

play13:31

examples

play13:33

the four algorithms that we will try to

play13:35

understand are k nearest neighbor

play13:38

linear regression

play13:40

decision tree and naive bayes

play13:43

let's start with our first machine

play13:45

learning solution k nearest neighbor k

play13:48

near its neighbor is again a kind of a

play13:50

classification algorithm as you can see

play13:52

on the screen the similar data points

play13:54

form clusters

play13:56

the blue one

play13:59

the red one

play14:02

and the green one there are three

play14:04

different clusters

play14:05

now if we get a new and unknown data

play14:07

point it is classified based on the

play14:10

cluster closest to it or the most

play14:11

similar to it

play14:13

k in k n is the number of nearest

play14:15

neighboring data points we wish to

play14:17

compare the unknown data with

play14:20

let's make it clear with an example

play14:22

let's say we have three clusters in a

play14:24

cost to durability graph

play14:26

first cluster is of footballs

play14:30

the second one is of tennis balls

play14:33

and the third one is of basketballs

play14:37

from the graph we can say that the cost

play14:39

of footballs is high and the durability

play14:42

is less

play14:43

the cost of tennis balls is very less

play14:46

but the durability is high and the cost

play14:48

of basketballs

play14:50

is as high as the durability

play14:52

now let's say we have an unknown data

play14:54

point

play14:55

we have a black spot which can be one

play14:57

kind of the balls but we don't know what

play14:59

kind it is

play15:01

so what we'll do we'll try to classify

play15:03

this using knn

play15:05

so if we take k is equal to 5 we draw a

play15:08

circle keeping the unknown data point at

play15:10

the center and we make sure that we have

play15:13

five

play15:14

balls inside that circle in this case we

play15:17

have a football a basketball and three

play15:19

tennis balls

play15:21

now since we have the highest number of

play15:22

tennis balls inside the circle

play15:24

the classified ball would be a tennis

play15:27

ball

play15:29

so that's how k nearest neighbor

play15:31

classification is done

play15:33

linear regression is again a type of

play15:35

supervised learning algorithm this

play15:38

algorithm is used to establish linear

play15:40

relationship between variables one of

play15:42

which would be dependent and the other

play15:44

one would be independent

play15:46

like if we want to predict the weight of

play15:48

a person based on his height

play15:50

weight would be the dependent variable

play15:52

and height would be independent

play15:54

let's have a look at it through an

play15:55

example

play15:57

let's say we have a graph here showing a

play15:59

relationship between height and weight

play16:02

of a person

play16:03

let's put the y-axis as h

play16:06

and the

play16:07

x-axis as weight

play16:12

so the green dots are the various data

play16:14

points

play16:16

these green dots are the data points

play16:18

and d

play16:19

is the mean squared error that is the

play16:21

perpendicular distances from the line to

play16:24

the data points

play16:25

are the error values

play16:29

this error tells us how much the

play16:31

predicted values vary from the original

play16:33

value

play16:35

let's ignore this blue line for a while

play16:38

so let's say if this is our regression

play16:41

line

play16:42

you can see the distance from all the

play16:44

data points from this line is very high

play16:49

so if we take this line as a regression

play16:51

line

play16:52

the error in the prediction will be too

play16:55

high

play16:56

so

play16:58

in this case the model will not be able

play17:00

to give us a good prediction

play17:02

let's say we draw another regression

play17:04

line here like this

play17:06

even in this case you can see that the

play17:08

perpendicular distance of the data

play17:10

points from the line is very high

play17:13

so the error value will still come as

play17:15

high as the last one

play17:17

so this model will also not be able to

play17:19

give us a good prediction

play17:22

so what to do

play17:24

so finally we draw a line which is this

play17:27

blue line

play17:28

so here we can see that the distance of

play17:31

the data points from the line is very

play17:33

less

play17:34

relative to the other two lines we drew

play17:38

so the value of d for this line will be

play17:40

very less

play17:42

so in this case if we take

play17:44

any value on the x-axis the

play17:45

corresponding value on the y-axis will

play17:47

be our prediction

play17:49

and

play17:50

given the fact that the d is very low

play17:52

our prediction should be good also

play17:56

this is how regression works

play17:58

we draw a line a regression line that is

play18:00

in such a way that the value of d is the

play18:03

least eventually giving us good

play18:05

predictions

play18:08

this algorithm that is decision tree is

play18:11

a kind of an algorithm you can very

play18:12

strongly relate to

play18:14

it uses a kind of a branching method to

play18:16

realize the problem and make decisions

play18:18

based on the conditions

play18:20

let's take this graph as an example

play18:22

imagine yourself sitting at home getting

play18:24

bored you feel like going for a swim

play18:26

what you do is you check if it's sunny

play18:28

outside so that's your first condition

play18:31

if the answer to that condition is yes

play18:34

you go for a swim if it's not sunny then

play18:36

the next question you would ask yourself

play18:38

is if it's raining outside so that's

play18:40

condition number two if it's actually

play18:42

raining you cancel the plan and stay

play18:44

indoors if it's not raining then you

play18:46

would probably go outside and have a

play18:48

walk

play18:49

so that's the final node

play18:51

that's how decision tree algorithm works

play18:54

you probably use this every day it

play18:56

realizes a problem and then takes the

play18:58

decisions based on the answers to every

play19:00

conditions

play19:02

nybis algorithm is mostly used in cases

play19:05

where a prediction needs to be done on a

play19:07

very large data set it makes use of

play19:09

conditional probability

play19:11

conditional probability is the

play19:12

probability of an event say a happening

play19:15

given that another event b has already

play19:17

happened

play19:18

this algorithm is most commonly used in

play19:20

filtering spam mails in your email

play19:22

account

play19:23

let's say you receive a mail

play19:25

the model goes through your old spam

play19:27

mail records

play19:30

then it uses space theorem to predict if

play19:33

the present mail is a spam mail or not

play19:36

so pc of a is the probability of even c

play19:40

occurring when a has already occurred

play19:43

b

play19:44

a of c is the probability of event a

play19:46

occurring when c has already occurred

play19:49

and b c

play19:50

is the probability of event c occurring

play19:52

and p a is a probability of event a

play19:55

occurring

play19:57

let's try to understand naive bayes with

play19:59

a better example

play20:00

nybase can be used to determine on which

play20:03

days to play cricket

play20:04

based on the probabilities of a day

play20:06

being rainy windy or sunny the model

play20:08

tells us if a match is possible

play20:11

if we consider all the weather

play20:13

conditions to be event a for us

play20:16

and the probability of a match being

play20:18

possible even c

play20:20

so the model applies the probabilities

play20:22

of event a and c into the bayes theorem

play20:25

and predicts if a game of cricket is

play20:27

possible on a particular day or not

play20:30

in this case if the probability of c of

play20:33

a is more than 0.5 we can be able to

play20:36

play a game of cricket if it's less than

play20:38

0.5 we won't be able to do that that's

play20:41

how naive algorithm works

play20:44

so that brings us to the end of the

play20:45

video i hope you guys understood the

play20:47

concepts put your doubts and feedbacks

play20:49

in the comments below and stay tuned for

play20:51

more videos

play20:57

hi there if you like this video

play20:58

subscribe to the simply learn youtube

play21:00

channel and click here to watch similar

play21:03

videos to nerd up and get certified

play21:05

click here

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
Machine LearningAI BasicsSupervised LearningUnsupervised LearningReinforcement LearningML AlgorithmsTech TutorialAI ApplicationsGaming AIE-commerce AI