introduction to Supervised Machine Learning

Introduction To Supervised Learning

So In our last article we learn about what is Machine Learning. now lets deep down to their Types. Basically we can divide Machine Learning Into 3 Types.

  1. Supervised Learning
  2. Unsupervised Learning
  3. Reinforcement Learning
Machine Learning Type - DataSciInsight.com
Machine Learning Type – DataSciInsight

Supervised Learning:

Supervised learning is a type of machine learning where the algorithm is trained on a labeled dataset, which means the dataset includes both input data and corresponding output labels. The goal of supervised learning is to learn a mapping from inputs to outputs so that, given new, unseen data, the algorithm can predict or classify the output accurately.

In supervised learning, the algorithm learns from the labeled examples provided during the training phase. It tries to find patterns or relationships between the input variables and the target variable (the output) in order to make predictions or decisions when presented with new, unseen data.

In a simple word we can Say:

Supervised learning is when we teach a computer using lots of examples and tell it the right answers. It’s like showing a computer pictures of animals and telling it what each animal is called. Then, the computer learns to figure out what other animals are called by looking at the pictures and remembering the names we told it

 

Lets Understand With Simple Example;

Imagine you’re teaching your little cousin, Timmy, about different animals. You show him pictures of animals and tell him their names. For example, you might show him a picture of a dog and say, “This is a dog.” Then you show him a picture of a cat and say, “This is a cat.”

Now, Timmy wants to learn more about animals, but he doesn’t know the names yet. So you decide to play a game. You show him a picture of an animal, but you don’t tell him what it is. Instead, you ask him to guess the name of the animal. Timmy might guess based on what he knows so far, or he might take a wild guess.

After he guesses, you tell him whether he’s right or wrong. If he’s right, you praise him and maybe give him a treat. If he’s wrong, you gently correct him and explain the correct answer. Then you show him the picture again, and he remembers the right name for next time.

This game is a lot like supervised learning! Here’s how:

  1. Teacher (You): You’re like the teacher, showing Timmy pictures of animals and telling him their names. In supervised learning, the computer is the “student,” and it learns from the examples you give it.
  2. Examples with Answers: Each picture of an animal with its name is an example with an answer. In supervised learning, the computer gets lots of examples of things (like pictures) along with what they’re called (the answers).
  3. Guessing and Learning: When Timmy tries to guess the name of an animal, he’s like the computer trying to figure out what something is based on the examples it’s seen. If Timmy guesses wrong, he learns from the feedback (whether he was right or wrong) and gets better over time. Similarly, the computer learns from its mistakes and improves its guesses based on the feedback it gets from the examples.

So, in supervised learning, the computer learns by looking at examples with answers, just like Timmy learns about animals by looking at pictures and hearing their names. It’s a fun way for computers to learn and get better at things, just like kids do!

Types Of Supervised Learning Algorithm:

we can divide Supervised learning into two Categories: Regression and Classification. In regression, Algorithm learns from continuous data and predict continuous output Value, such as the temperature of the city, house price based on area. In Classification problem, Algorithm predict a Discrete Value or Categorical Value or class value such as the image is of dog or cat.

Types of Supervised Algorithm - datasciInsight
Types of Supervised Algorithm – datasciInsight

 

Regression:

Regression is a statistical method used in machine learning to predict or estimate a continuous outcome (dependent variable) based on one or more input variables (independent variables). It seeks to find the relationship between the independent variables and the dependent variable by fitting a mathematical model to the observed data.

Now, let’s explain regression with an example:

Example: Suppose you want to predict the selling price of houses based on their size (in square feet). You have data on the size of several houses and their corresponding selling prices. Regression can help you analyze this data and build a model that predicts the selling price of a house based on its size.

Let’s say you have the following data:

House Size(sq. ft)Selling Price($)
2500300000
2000250000
1500200000
1000150000
3000350000

In this table, “House Size (sq. ft.)” represents the size of the houses in square feet, and “Selling Price ($)” represents the corresponding selling prices of the houses in dollars.

Now, let’s use regression to predict the selling price of a house with a size of 1800 square feet. We’ll fit a regression model to this data to estimate the relationship between house size and selling price.

Classification:

Classification is a type of machine learning algorithm used to categorize data into distinct classes or categories based on features or attributes. It assigns labels to data points based on their characteristics, aiming to classify new data points into predefined categories.

Now, let’s explain classification with an example:

Example: Suppose you want to classify emails as either “spam” or “not spam” based on their content. You have a dataset of emails labeled as either “spam” or “not spam,” along with their corresponding features (e.g., words used in the email, length of the email, presence of certain keywords).

Email ContentLabel
Get a free Cruise Now!spam
Invitation to the team meeting tomorrownot spam
Important updaets on your accountnot spam
Claim your prize now!spam
Weekly newsletter subscriptionnot spam

In this table, “Email Content” represents the content of the emails, and “Label” represents whether each email is categorized as “spam” or “not spam.”

Now, let’s perform classification analysis on this data to build a model that predicts whether new emails are “spam” or “not spam” based on their content and other features. We’ll use this model to classify new emails into the appropriate category.

Advantages of Supervised Learning:

  1. Clear Guidance: Supervised learning provides clear guidance to the model by using labeled data, which helps the model understand the relationship between input features and output labels.
  2. Predictive Accuracy: Supervised learning models can often achieve high predictive accuracy, especially when trained on large and diverse datasets.
  3. Versatility: Supervised learning can be applied to a wide range of tasks, including classification, regression, and even ranking, making it versatile for various real-world applications.
  4. Interpretability: In many cases, supervised learning models offer interpretability, meaning that it’s possible to understand and explain how the model makes predictions based on the input features.
  5. Well-Understood Framework: Supervised learning has been extensively studied and developed over the years, leading to a wealth of algorithms, techniques, and tools that practitioners can leverage.

Disadvantages of  Supervised Learning:

  1. Dependency on Labeled Data: Supervised learning requires labeled data for training, which can be costly and time-consuming to obtain, especially for large-scale datasets or niche domains.
  2. Overfitting: Supervised learning models may suffer from overfitting, where they perform well on the training data but generalize poorly to unseen data. This often occurs when the model is too complex relative to the amount of training data available.
  3. Bias in Training Data: Supervised learning models can inherit biases present in the training data, leading to biased predictions and potentially unfair outcomes, especially when the training data is not representative of the real-world population.
  4. Limited Generalization: Supervised learning models may struggle to generalize to new or unseen scenarios that differ significantly from the training data. This limitation can restrict the applicability of the model in dynamic or changing environments.
  5. Data Quality Requirements: Supervised learning models are sensitive to the quality of the training data. Noisy or erroneous data can adversely affect model performance and reliability, necessitating thorough data pre-processing and cleaning efforts.
User Avatar
Datasciinsight
https://datasciinsight.com

4 Comments

Introduction to Unsupervised Learning

[…] the previous topic we learn about types of Machine Learning and Supervised learning. In Supervised learning we train model on label data. but there may be many cases where we do not […]

An introduction to Machine Learning – datasciinsight

[…] Supervised Learning: This is like teaching with examples. You show the computer lots of examples with answers, and it learns from them. For example, if you want to teach a computer to recognize cats, you’d show it many pictures of cats along with the word “cat.” […]

difference between supervised and unsupervised learning – deep dive to learning new things – datasciinsight

[…] Supervised learning […]

what is reinforcement learning – deep dive to learning new things – datasciinsight

[…] our previous article we understand about supervised and unsupervised learning. Now let’s deep dive to the third (3th) type of Machine Learning, […]

Leave a Reply