Supervised vs Unsupervised Learning | Intellipaat

Warm welcome to each and every one of you for today's session bought to you by Intellipaat. So, Machine Learning is a subfield of artificial intelligence where data is being fed into machines to make some insightful decisions. So broadly, Machine Learning is divided into three: supervised learning, unsupervised learning, and reinforcement learning. So, in today's session, we'll be largely focusing on all these three terms, what they are, and what are the differences between them. So, before we start, please do subscribe to Intellipaat's YouTube channel to get some instant notification about our upcoming videos. Also guys, if you're interested in an end-to-end certification course on Artificial Intelligence, please do check out Intellipaat's Artificial Intelligence Engineers master's course. This is co-created in association with IBM. This course provides all the required skills to master the art of Artificial Intelligence. So, without any further delays, let's get started. Machine Learning is subcategorized into supervised learning, unsupervised learning, and reinforcement learning. So, let's start off with supervised learning. In supervised learning, we teach the machine using data which is labeled. Let's say we have a bunch of fruits and each fruit is tagged with a label. So here, the machine learns that an apple looks like this, a mango looks like this, a banana looks like this, and an orange looks like this. So, once the training is done, the machine is fed with new data or test data. So here, the machine is fed with a new image of Apple and the machine predicts that there is a 97% probability that this is an apple. Now, supervised learning can again be divided into classification and regression. So, classifying the input data is a very important task in Machine Learning, for example, whether the mail is genuine or spam, whether the transaction is fraudulent or not, and there are multiple other examples. So, let's say you live in a gated housing society, and your society has separate dustbins for different types of wastes.

So, one dustbin for paper waste, one for metal waste, one for plastic waste, and so on. So now what you are basically doing over here is classifying the wastes into different categories. So the classification is the process of assigning a class label to a particular item. In this example, we are assigning the labels paper, metal, plastic, and so on, to different types of wastes. One thing to note in classification algorithms is that the output variable is categorical in nature. Let's take this example to understand it better. So, over here we have gender of the student and result of the student. Here, gender is the input variable or the independent variable and result is the output variable or the dependent variable. So, we see that our output variable is categorical in nature, that is, it has two categories: either pass or fail. Here, we are trying to determine whether the student will pass the exam or not on the basis of the gender of the student. So, there are different classification algorithms such as decision tree, random forest, naive Bayes, and support vector machine, to name a few. Let's go through the concept of decision tree briefly. Decision tree, as the name states, is a tree-based classifier in Machine Learning. You can consider it to be an upside-down tree where each node splits into its children based on a condition. So let's take this example to understand decision tree better. Here, we are building a decision tree to find out if the person is fit or not. Based on a series of test conditions, we finally arrive at the leaf nodes and classify the person to be fit or not. So, the next type of supervised learning algorithm is regression. So when it comes to regression, the output variable, although a dependent variable, is a continuous numerical. So, let's take this graph over here. Here, we have horsepower on the y-axis and miles per gallon on the x-axis, or in other words, horsepower is the dependent variable and miles per gallon is the independent variable.

So, we see that our output variable is of continuous numerical, and here we are trying to determine how does the horsepower of the car vary with its MPG. So, this is the concept of regression. Now, let's see some of the use cases of supervised learning. So, first we have spam classifier. So, how do you think your mail is being classified as whether it is spam or not. This spam detection basically works on the concept of filters. So, mainly there are two types of filters: text filter and client filter. The text filter works by using algorithm that detects which words and phrases are often used in the spam email, so phrases like lottery, or you won, or or free bitcoin are often an immediate flag for removal by filters. So, next is the client filter: As the name states, client filter understands the client identity and history to block malicious and annoying spam email. So, how does this client filter work? Well, this is done by looking at all the messages of a certain user which he has sent out. So, if a user has sent out huge amount of emails constantly, or several of the users' messages have already been marked as spam, then in that case, their email will be blocked entirely. So, this brings us the use of blacklist. Just a quick info guys: In case you are interested in an end-to-end certification course in Artificial Intelligence, please do check out Intellipaat's Artificial Intelligence Engineers Master's Course that is co-created in association with IBM. So, this course provides all the required skills to become a successful Artificial Intelligence Engineer. The information about the same is available in the description below. So now, let's get back to the session. Spam filters also include something known as blacklist. So, blacklistIng is the process of adding known email addresses of a spammer to a list, and this list prevents the users' messages to be forwarded to someone else. Now, let's look at the next use case: Fingerprint analysis.

So in fingerprint analysis, you save your fingerprint in a machine as a record, so the machine checks the data and verifies whether the data belongs to you or not. So once the data is saved into the machine, from next time whenever you put your fingerprint on the machine, the machine will scan through all of its user data and if the machine finds a match of your fingerprint in its data, then your fingerprint will be verified. Now that we've completed the different types of supervised learning algorithms, let's go ahead and understand what is unsupervised learning. So when it comes to unsupervised learning, the input data doesn't have any labels associated with it. The machine understands the underlying structure of the data to identify similar patterns, and the data which is similar in nature is grouped together. So, here even though there are no labels, the machine understands that all the apples are similar in nature, and thus they are grouped together. Same is the case with bananas and oranges. So this is the concept of unsupervised learning. Now let's go through an unsupervised machine learning algorithm called as K-means. So, the aim of K-means is to group similar data points into a single cluster. So, there must be high intra-cluster similarity and low inter-cluster similarity, that is, all the data points within a cluster should be as similar as possible, and all the data points between two different clusters should be as dissimilar as possible, or in other words, all the points inside cluster A should be very similar to each other, but when we compare a point from cluster B with a point from cluster C, then they would be very dissimilar to each other. In K-means clustering, 'K' denotes the number of clusters to be formed. So in this picture over here, the value of K is 3, and hence 3 clusters are formed. Now let's go through a use case of unsupervised learning. Netflix recommendation is a perfect use case of unsupervised learning.

So, more than 80% of the TV shows that you watch on Netflix are discovered through the platform's recommendation system. It means the majority of what you watch on Netflix is the result of decisions made by a mysterious black box of an algorithm. So, let me just give you a brief of how it works. Well, Netflix uses Machine Learning algorithm to recommend you a list of movies and shows that you might not have initially chosen. To do this, it looks through a thread within the content rather than relying on new joiners to make a prediction. This explains how 1 in 8 people who watch Marvel shows are completely new to comic book-based stuff on Netflix. Finally, there's reinforcement learning. So, in reinforcement learning, the algorithm learns through a system of rewards and punishment, and the goal here is to maximize the total reward. Let's take this example to understand reinforcement learning. So here we have a self-driving car which is supposed to reach its destination without hitting any barricades. So here, the self-driving car is the agent, and the road is the environment. Here, the car takes an action and goes straight but when it goes straight, it directly hits the barricade. Now since the car has taken a wrong action. it will be punished. So, the car realizes that going straight is wrong and it has to go right. So when it goes right, it will be given a reward. So this process continues and the car learns how to drive by itself without hitting any barricades. So the obvious application of reinforcement learning is a self-driving car. A recent study has shown that over 90% of road accidents are caused by human error. So to err is human, but behind the wheel, mistakes are often more catastrophic. Accidents have led to a massive amount of unnecessary deaths. So, this is where self-driving cars come into the picture. So, trust me, the autonomous car or the self-driving car is much safer than a human-driven car. They are.

Unaffected by factors like human fatigue or dullness, and this makes them very safe and self-driving cars are always attentive observing their environment and scanning multiple directions it would be difficult to make a move that the car is not anticipating so how does a self-driving car work well self-driving cars mainly rely on three technologies IOT sensors IOT connectivity and software algorithm there are many types of sensors available for our self-driving car for example sensors for blind spot monitoring forward collision warning radar and so on so all of these IOT sensors work together to help in navigation of the self-driving car next is the IOT connectivity self-driving cars use cloud computing to act on traffic data weather maps adjacent cars and so on this helps the car to monitor its surroundings better and make informed decisions and next is the software algorithm all the data is the car collects needs to be analyzed to determine the best course of action and this is the main function or the control algorithm and this is where reinforcement learning comes into the picture this is the most complex power of the self-driving cars since it has to make decisions flawlessly so in today's world the most famous self-driving cars are those from Tesla and Google so Tesla cars work by analyzing their environment by using a software system known as autopilot so autopilot uses high-tech cameras to view and collect data from their environment so it's the same as what we do with our eyes and autopilot uses this data to make decisions during navigation now let's quickly head onto the quiz so this is a first question who here Amazon product recommendation uses which of the following machine learning techniques sepoys learning unsupervised learning or reinforcement learning so guys what do you think is the answer so whatever you think is right do put down in the comment box just a quick info guys in case you are interested in an end-to-end certification course in.

Artificial intelligence please do check out intelli Pat's artificial intelligence engineers master's course that is co-created in association with IBM so this course provides all the required skills to become a successful artificial intelligence engineer the information about the same is available in the description below so guys this brings us to the end of the session in case you have any clarifications concerns difficulties please post your comments below we will reach out to you immediately also guys don't forget to subscribe to intelli Pat's YouTube channel to get some instant notification about our upcoming videos so thank you all.