Supervised and Unsupervised learning

Supervised vs Unsupervised Learning

In the world of data science supervised, and unsupervised learning algorithms were the famous words, we could hear more frequently these while we were talking with the people who are working in data science field. Furthermore, the key differences between these two learning algorithms are the must learn concepts for differentiating the real world problems.

Supervised Learning Wiki Definition

        Supervised learning is a data mining task of inferring a function from labeled training data.The training data consist of a set of training examples. In supervised learning, each example is a pair consisting of an input object (typically a vector) and the desired output value (also called the supervisory signal).

A supervised learning algorithm analyzes the training data and produces an inferred function, which can used for mapping new examples. An optimal scenario will allow for the algorithm to correctly determine the class labels for unseen instances. This requires the learning algorithm to generalize from the training data to unseen situations in a “reasonable” way.

Unsupervised Learning Wiki Definition

In data mining or even in data science world, the problem of an unsupervised learning task is trying to find hidden structure in unlabeled data. Since the examples given to the learner are unlabeled, there is no error or reward signal to evaluate a potential solution.

Supervised and unsupervised learning explanation with a real-life examples Click To Tweet

Supervised  and unsupervised learning with a real-life example

Examples for supervised and unsupervised classification

  • Suppose you had a basket and f illed it with different kinds of fruits.
  • Your task is to arrange them into groups.
  • For understanding let me explain the names of the fruits in our basket.
  • We have four types of fruits. They are
red apple

APPLE

BANANA

BANANA

GRAPE

GRAPE

cherries supervised learning examle

CHERRIES

 

Supervised Learning:

  • You already learn from your previous work about the physical characters of fruits
  • So arranging  the same type of fruits at one place is easy now
  • In data mining terminology the earlier work is called as training the data
  • You already learn the things from your train data. This is because of response variable
  • Response variable means just a decision variable
  • You can observe response variable below (FRUIT NAME)
No. SIZE COLOR SHAPE FRUIT NAME
1 Big Red Rounded shape with depression at the top Apple
2 Small Red Heart-shaped to nearly globular Cherry
3 Big Green Long curving cylinder Banana
4 Small Green Round to oval,Bunch shape Cylindrical Grape
  • Suppose you have taken a new fruit from the basket then you will see the size, color, and shape of that particular fruit.
  • If size is Big, color is Red, the shape is rounded shape with a depression at the top, you will confirm the fruit name as apple and you will put in apple group.
  • Likewise for other fruits also.
  • The job of grouping fruits was done and the happy ending.
  • You can observe in the table that a column was labeled as “FRUIT NAME“. This is called as a response variable.
  • If you learn the thing before from training data and then applying that knowledge to the test data(for new fruit), This type of learning is called as Supervised Learning.

Supervised Learning Algorithms:

All classification and regression algorithms come under supervised learning.

Unsupervised Learning:

  • Suppose you have a basket and it is filled with some different types of fruits and your task is to arrange them as groups.
  • This time, you don’t know anything about the fruits, honestly saying this is the first time you have seen them. You have no clue about those.
  • So, how will you arrange them?
  • What will you do first???
  • You will take a fruit and you will arrange them by considering the physical character of that particular fruit.
  • Suppose you have considered color.
    • Then you will arrange them on considering base condition as color.
    • Then the groups will be something like this.
      • RED COLOR GROUP: apples & cherry fruits.
      • GREEN COLOR GROUP: bananas & grapes.
  • So now you will take another physical character such as size.
    • RED COLOR AND BIG SIZE: apple.
    • RED COLOR AND SMALL SIZE: cherry fruits.
    • GREEN COLOR AND BIG SIZE: bananas.
    • GREEN COLOR AND SMALL SIZE: grapes.
  • The job has done, the happy ending.
  • Here you did not learn anything before ,means no train data and no response variable.
  • In data mining or machine learning, this kind of learning is known as unsupervised learning.

Unsupervised learning algorithms:

All clustering algorithms come under unsupervised learning algorithms.

  • K – means clustering
  • Hierarchical clustering
  • Hidden Markov models

Summary:

Let’s summarize what we have learned in supervised and unsupervised learning algorithms post.

Supervised learning: Learning from the know label data to create a model then predicting target class for the given input data.

Unsupervised learning: Learning from the unlabeled data to differentiating the given input data.

 

Follow us:

FACEBOOKQUORA |TWITTER| GOOGLE+ | LINKEDINREDDIT | FLIPBOARD | MEDIUM | GITHUB

I hope you like this post. If you have any questions then feel free to comment below.  If you want me to write on one specific topic then do tell it to me in the comments below.

Related Courses:

Do check out unlimited data science courses

Title of the course Course Link What You Will Learn
Pattern Discovery in Data Mining
Pattern Discovery in Data Mining
  • Will learn the basic concepts of data mining and it’s real world applications.
  • Will also learn data-driven methods and some interesting of pattern discovery.
  • Practice the scalable pattern discovery methods on massive transaction data.
Introduction to machine learning
Machine Learning
  •  Introduce the basic machine learning, data mining, and pattern recognization concepts.
  • In details differences of supervised and unsupervised learning algorithms.
  • Lot more case studies and machine learning applications.
 Data Mining with Python
Data Mining with Python: Classification and Regression
  • Understand the key concepts in data mining and will learn how to apply these concepts to solve the real world problems.
  • Will get hands on experience with python programming language.
  • Hands on experience with numpy, pandas, matplotlib libraries (Python libraries)
  • Sneha says:

    can u plss explain me classification and clustering differences with some examples…am fully unaware of data mining???plssss

  • challarao says:

    Nice explanations….please keep posting…love to learn…

  • Anonymous says:

    best

  • Shafi says:

    Great Job Sai Madhu…:)

  • redserpent says:

    Reblogged this on Redserpent's Weblog and commented:
    Nice article for Data newbies

  • Great post saimadhu, can I use your first image above (robot image) for my presentation? I will link it back to your blog to give credit on your work.

  • Anonymous says:

    Your explanation was so interesting. Appreciate your thoughts for bringing in amazing example. Try to work on examples of this sort for other techniques also.

  • Anonymous says:

    very good article.. please give explanations on feature sections and feature extractions.

  • Anonymous says:

    good work 🙂

  • Jaggu says:

    Good explanation madhu. Keep it goes on with aspiration

  • Anonymous says:

    Nice answer please give a*search ans also

  • Anonymous says:

    Excellent..! Keep it up

  • Excellent post, this is also usefull for artficial intelligence

  • this is really wonderful it has explained me very well

  • Anonymous says:

    Nice Explanation…:)

  • TV Mohini says:

    This is fantastic Madhu. Wish to see many more posts from you my dear.

  • Akshat SInha says:

    Reblogged this on "Unique Facts" a blog by Akshat and commented:
    MACHINE LEARNING

  • Anonymous says:

    its very nice to remember for new beginers

  • Anonymous says:

    Perfect

  • […] in data mining. In next post, You can get the clear understanding of the difference between supervised learning and unsupervised learning with real life […]

  • […] starts from  categorising the problem itself. The first level of categorising could be whether supervised or unsupervised learning. The next level is what kind of algorithms to get start with whether to start with classification […]

  • […] and regression algorithms are supervised learning algorithms. You can study more about supervised and unsupervised learning from previous […]

  • […] neighbor classifier is one of the introductory supervised classifier, which every data science learner should be aware of. Fix & Hodges proposed K-nearest neighbor […]

  • […] predictive models. It holds tools for data splitting, pre-processing, feature selection, tuning and supervised – unsupervised learning algorithms, etc. It is similar to sklearn library in […]

  • […] trees .., etc. In this article, we were going to discuss  support vector machine which is a supervised learning algorithm. Just to give why we were so interested to write about Svm as it is one of the powerful technique […]

  • […] regression is a widely used supervised learning algorithm for various applications. The advantage of using linear regression is its implementation […]

  • […] predictive models. It holds tools for data splitting, pre-processing, feature selection, tuning and supervised – unsupervised learning algorithms, etc. It is similar to sklearn library in […]

  • […] Tree algorithm belongs to the family of supervised learning algorithms. Unlike other supervised learning algorithms, decision tree algorithm can be used for solving […]

  • […] models. It contains tools for data splitting, pre-processing, feature selection, tuning and supervised – unsupervised learning algorithms, etc. It is similar to Caret library in R […]

  • […] predictive models. It holds tools for data splitting, pre-processing, feature selection, tuning and supervised – unsupervised learning algorithms, etc. It is similar to the sklearn library in […]

  • […] favorite machine learning library scikit-learn. Next, we are going to use the trained Naive Bayes (supervised classification), model to predict the Census […]

  • […] regression model works in machine learning. The logistic regression model is one member of the supervised classification algorithm family. The building block concepts of logistic regression can be helpful in deep learning while […]

  • […] the pool of supervised classification algorithms, the logistic regression model is the first most algorithm to play with. This classification […]

  • […] classification is performing the task of classifying the binary targets with the use of supervised classification algorithms. The binary target means having only 2 targets values/classes. To get the clear picture about the […]

  • loubna says:

    hi!
    thanks a million for this explanation. Please can you tell us about used techniques to evaluate the result in case of unsupervised learning.??

  • […] tree classifier is the most popularly used supervised learning algorithm. Unlike other classification algorithms, decision tree classifier in not a black box in […]

  • […] fact, the foremost algorithms to study in unsupervised learning algorithms is clustering analysis algorithms. Today we are going to learn an algorithm to perform the cluster […]

  • >