Machine Learning Paradigms with Example

Souvik Last Updated : 25 Jul, 2022
6 min read

This article was published as a part of the Data Science Blogathon.

Introduction

Let’s have a simple overview of what Machine Learning is.

Machine Learning is the method of teaching computer programs to do a specific task accurately (essentially a prediction) by training a predictive model using various statistical algorithms leveraging data.

 Source: https://www.spiria.com/site/assets/files/6009/ai_banner.-large.jpg

For example, we have the following dataset:

dataset

Source: https://communities.sas.com/t5/image/serverpage/image-id/36435i6BBB5C52826D31EE/image-size/medium?v=v2&px=400

Suppose ‘Value_1’ and ‘Value_2’ are input variables and ‘Value_1_times_2’ is the output variable. Although we can infer manually from the data that the output result is the product of the input values, the data do not explicitly state that the mathematical formula of multiplication is being used in this situation.

If we feed this data into a machine learning algorithm to build a predictive model, it will automatically detect the relationship between the input and the output variables and will be able to predict the output values for new unseen (future data) input values. The accuracy of this prediction depends on many factors that are out of the scope of this article.

Now, let’s focus on machine learning paradigms. A learning paradigm describes a particular pattern in which someone or something learns. The learning paradigm to be applied is determined by the problem to solve and the dataset used in a particular scenario.

How many Machine Learning Paradigms? And, what are they?

Machine Learning is generally categorized into three primary paradigms. They are:

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning
MACHINE LEARNING

Machine Learning Bubble Chart

Source: https://miro.medium.com/max/1400/0*_cgWPP25djXBauNZ.png

High-Level Understanding and Insight into the different Machine Learning Paradigms

    1. Supervised Learning

High-Level Understanding in respect of real-life example:

Let’s understand the concept of the Learning Paradigms with the life of a baby boy named Lucas.

Lucas cannot yet identify or differentiate the different animals he sees in his neighborhood. So, his mother takes on the responsibility of teaching him about the various animals. She shows him an animal mentioning that it is a dog. She shows him another animal and tells him that it is a cat. This keeps repeating, and Lucas’ brain develops certain neural connections that help him differentiate and identify the different animals by understanding the relationship between the characteristics of specific animals and the keywords, viz. dog, cat, etc.

Therefore, Lucas learned to identify and classify the animals under supervision, essentially by a teacher.

machine learning | classification

Source: https://miro.medium.com/max/3840/1*oB3S5yHHhvougJkPXuc8og.gif

The above is an example of a classification problem as a categorical value is being predicted.

Detailed Insight into the learning paradigm:

  • In supervised learning, the computer learns from a labeled dataset, i.e., a set of input-output pairs.
  • Supervised learning aims to train a predictive model by feeding these input-output pairs of data into statistical algorithms.
  • The trained model learns the relationship between the input and output and becomes capable of predicting output values for new unseen or future input values.
  • The input or the independent variable(s) is/are called Feature(s), and the output or the dependent variable(s) is/are called Target Variable(s) or Label(s).

Let’s consider an example of the application of supervised learning. Following is a demo dataset of animal characteristics:

application of supervised learning

Source: https://www.wolfram.com/language/introduction-machine-learning/machine-learning-paradigms/img/2-machine-learning-paradigms-Print-1.en.png

Let’s set the columns ‘Age’ and ‘Sex’ as Features and ‘Weight’ as the Target Variable. Therefore, after we feed this data into a statistical algorithm and build a predictive model, it will be able to predict ‘Weight’ for any values of ‘Age’ and ‘Sex’ that are not present in the dataset used to train the model.

The above example is a regression problem as our target variable is a real/continuous value.

    2. Unsupervised Learning

High-Level Understanding in respect of real-life example:

Lucas has grown up a bit. Along his way to school, he sees a lot of different breeds of dogs possessing different characteristics.

Lucas does NOT have a teacher by his side now to tell him which dog is of what breed. But, he still tries to differentiate them and after some time, becomes capable of doing so even if he does not know the names of the specific breeds yet.

Therefore, Lucas learned to differentiate the dog breeds with NO supervision, essentially without a teacher.

no supervision

Source: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQYs7jv-KipkLkKSxR-gCtFIM6z1uExbE_wQg&usqp=CAU

Detailed Insight into the learning paradigm:

  • In unsupervised learning, the computer learns from an unlabeled dataset, i.e., there are NO input-output pairs, the data is just a set of observations or examples.
  • The unlabeled data is fed into an unsupervised machine learning algorithm to cluster or group the observations by analyzing the hidden patterns without human intervention.

For example, if we feed a dataset similar to the one in the supervised learning section (without considering Features and Target Variables) into an algorithm to build an unsupervised machine learning model, it clusters the observations in the following way:

clustured data

Source: https://www.wolfram.com/language/introduction-machine-learning/machine-learning-paradigms/img/2-machine-learning-paradigms-Print-5.en.png

The above is an example of a clustering problem/application.

    3. Reinforcement Learning

High-Level Understanding in respect of real-life example:

Lucas has developed an interest in chess. So, his parents let him join a chess academy. The teacher starts with the basics, and then decides to arrange chess matches among the students regularly.

The Rules are:

  • When a student wins a match – the student is rewarded with two chocolates.
  • When a student loses a match – the student is punished by taking away one chocolate.

The teacher believes that the students learn and improve their chess skills with this method.

This is the same way computers (AI) are taught to play chess using the reward and punishment mechanism.

Detailed Insight into the learning paradigm:

  • Reinforcement Learning is a lot different from the other two paradigms discussed above.
  • Unlike the other learning paradigms, a complete dataset with fixed values is NOT provided during training the model.
  • Rather, it is a process of continuous learning and improvement.
  • Leveraging the strategies of trial-and-error and reward-and-punishment, autonomous agents are taught a given task where they start undertaking certain random actions as a trial for which it is either rewarded if correct or punished if wrong.
  • Eventually, the autonomous agents learn and improve from the consequences of their actions received from an external system called the environment.

machine learning paradigams

Source: https://www.wolfram.com/language/introduction-machine-learning/machine-learning-paradigms/img/2-machine-learning-paradigms-Print-11.en.png

Conclusion

This article discusses the various machine learning paradigms in plain language and from a technical standpoint, making it easier to comprehend the subject matter, put it into practice, and respond confidently to any question relating to the topic in interviews.

Following are the key takeaway points from this article:

  • The three different machine learning paradigms help to solve different problem categories.
  • Supervised Learning is all about learning from a dataset of labeled examples and finding the correct label for new input examples in the future. It is similar to learning with a teacher.
  • Unsupervised Learning is about finding patterns and underlying relationships from unlabeled data. It is similar to learning without a teacher.
  • Reinforcement Learning is a situation where an autonomous agent is placed in an unfamiliar environment that will find the correct set of actions by using trial-and-error along with reward-and-punishment mechanisms.

The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.

An innate problem solver, once interested in VLSI field, drifted permanently into the field of Digital Technologies after realizing the true essence of solving real world problems and delivering business demands utilizing Data Science, Artificial Intelligence and Cloud Computing.
I try to lead others around me towards feeling the same :)

My profile reflects discipline and respect towards deadlines; delivering my responsibilities on time along with learning continuously for personal growth.

My interests and experience converge primarily in - Python (Programming Language), Data Science, Machine Learning, Deep Learning (TensorFlow), Cloud Computing (Microsoft Azure, AWS).

Other Skills - Programming Languages (C, C++), DBMS (SQL), Web Development (HTML, CSS, JavaScript)

At present, I am working as a Data Scientist in the AI Team of Advanta Development at Siemens.

Previously, I have interned at TCS (Digital Cadre); an opportunity that I got with my full-time offer of 'Systems Engineer' role at Tata Consultancy Services in Digital Profile. Utilized my problem solving and team working skills to develop a project named "Video-Bin: AI-Driven Video Search" aiming at solving a business problem statement while growing my hands-on knowledge in Data Science, AI/ML and Cloud Computing.

Apart from work experience, I with my team have published a research paper named "Arrhythmic Heartbeat Classification using Ensemble of Random Forest and Support Vector Machine" in the reputed IEEE Journal: "Transactions on Artificial Intelligence". We developed a completely new approach/model using niche Feature Extraction Techniques, Feature Selection Algorithms, Data Balancing, and the best Machine Learning algorithms applicable for the particular ECG dataset to retrieve an overall accuracy of 98.21%, which was better than the previously published state-of-the-art approach.

A long way to go, a lot to learn, working towards that everyday :)

Responses From Readers

Clear

Somdatta Chakraborty
Somdatta Chakraborty

Some good real-life examples there!

Congratulations, You Did It!
Well Done on Completing Your Learning Journey. Stay curious and keep exploring!

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details