DEV Community

Fardeen9065
Fardeen9065

Posted on

Supervised and Unsupervised Learning

Supervised and Unsupervised Learning are an important part of Machine Learning. These two models of machine learning are used frequently in many works.

So what is Supervised Learning? Supervised Learning is that part of machine learning which takes an input x and gives a corresponding output. We can take the example of house price predictor. For predicting the price of the house, we can take the size of the house as input x and predict the price of the house. But how will we do this? First, let's see the graph of size and price of the house.
Image description
In this graph we have plotted some points for house price. Now we can pass a straight line through these points and this straight is the prediction of the house of the house like this image below.
Image description
This method of passing a straight line for predicting an output is called regression. There is another part of Supervised Learning which is called classification. It has a fixed set of outputs. We can take the example of spam detection for an email. In this case, we can have only two outputs which are that the email will be a spam or it won't.

Now we can talk about Unsupervised Learning. Unlike Supervised Learning, Unsupervised Learning is used to find a pattern within a data and seperating a boundary for the data. We an see the example in the following graph.
Image description
Clustering is a good example of Unsupervised Learning.
In conclusion, Supervised Learning Learning takes an input variable x and finds the corresponding output y and Unsupervised Learning finds a pattern within the data and predicts a solution for the data.

Top comments (0)