My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Supervised and Unsupervised Learning

Sairam Nomula's photo
Sairam Nomula
·Sep 7, 2021·

3 min read

Supervised and Unsupervised Learning

In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output. Supervised learning problems are categorized into “regression” and “classification” problems.

image.png

  • Regression problem consists of mathematical methods that allow data scientists to predict a continuous outcome (y) based on the value of one or more predictor variables (x). Linear regression is probably the most popular form of regression analysis because of its ease of use in predicting and forecasting.

  • Classification problem refers to a predictive modeling problem where a class label is predicted for a given example of input data.

Example:

(a) Regression — Given a picture of a person, we have to predict their age on the basis of the given picture.

(b) Classification — Given a mail, we have to predict whether it is spam or not.

Advantages of Supervised learning:

  • With the help of supervised learning, the model can predict the output on the basis of prior experiences.

  • In supervised learning, we can have an exact idea about the classes of objects.

  • Supervised learning model helps us to solve various real-world problems such as fraud detection, spam filtering, etc.

Disadvantages of supervised learning:

  • Supervised learning models are not suitable for handling complex tasks.
  • Supervised learning cannot predict the correct output if the test data is different from the training dataset.

  • Training required lots of computation times.

  • In supervised learning, we need enough knowledge about the classes of objects.

Unsupervised learning is a type of machine learning in which models are trained using unlabeled dataset and are allowed to act on that data without any supervision.

Unsupervised learning cannot be directly applied to a regression or classification problem because, unlike supervised learning, we have the input data but no corresponding output data. The goal of unsupervised learning is to find the underlying structure of the dataset, group that data according to similarities, and represent that dataset in a compressed format.

image.png

Clustering:

Clustering is a method of grouping the objects into clusters such that objects with the most similarities remain in a group and have fewer or no similarities with the objects of another group. Cluster analysis finds the commonalities between the data objects and categorizes them as per the presence and absence of those commonalities.

Association:

An association rule is an unsupervised learning method that is used for finding the relationships between variables in a large database. It determines the set of items that occurs together in the dataset. Association rule makes marketing strategy more effective. Such as people who buy X items (suppose a bread) are also tend to purchase Y (Butter/Jam) items. A typical example of the Association rule is Market Basket Analysis.

Advantages of Unsupervised Learning:

  • Unsupervised learning is used for more complex tasks as compared to supervised learning because, in unsupervised learning, we don’t have labeled input data.

  • Unsupervised learning is preferable as it is easy to get unlabeled data in comparison to labeled data.

Disadvantages of Unsupervised Learning:

  • Unsupervised learning is intrinsically more difficult than supervised learning as it does not have corresponding output.

The result of the unsupervised learning algorithm might be less accurate as input data is not labeled, and algorithms do not know the exact output in advance.

image.png