hacking, cyber, blackandwhite-2903156.jpg

different types of machine learning techniques

This article tells us about different types of machine learning techniques and their basics.

Before diving deep into the details and mathematics behind machine learning algorithms, let’s first have a brief idea about machine learning and its different types. Human beings learn from past experiences. You have observed how parents teach their children by showing them images, videos, etc. of different objects so that when they saw similar objects, they can differentiate between them.

Machine learning works in a similar way. It is a subfield of artificial intelligence which enables machines to learn from past experiences with minimum human intervention and improve their performance without being explicitly programmed. For instance, consider an image classification problem in which an algorithm is trained by feeding input images and their labels. Just like humans, the algorithm learns the structure of data, and this learned behavior is then used to classify new examples.

The machine learning model takes input data, learns the features, and then evaluates the model by testing it on unseen data. The model then fine-tunes its hyperparameters and is retrained based on the new parameters. The same process is repeated until the desired performance is achieved.  In short, you can say that machine learning is basically incorporating intelligence into machines.

How machine learning is different from Traditional programming?

Now the main question is why we need machine learning? What differentiates machine learning from traditional programming? Traditional programming requires a well-written program that takes some input data and produces the desired output. It requires hard-coded instructions, which are then executed, tested, errors are analyzed and then you rewrite the program. Then the same process is continued until all the errors are removed. A typical workflow of traditional programming is illustrated in fig 1.


Fig 1. Workflow of Traditional programming

What if we can automate this process? What if the machines can automatically learn instead of manually writing lengthy complex programs? That is the point where machine learning comes into action. A tremendous amount of data is produced daily through different social media platforms, smart devices, etc. These large datasets cannot be handled easily with the traditional methods.  The emergence of machine learning has revolutionized the tech industry by automating tasks that can easily handle these huge amounts of data to accelerate the decision-making process. Instead of manually programming the logic, the model automatically formulates code rules. Figure 2 shows the basic working principle followed by machine learning algorithms.

Fig 1. Workflow of Machine Learning
Types of machine learning

You’re well aware of the concept behind the term “machine learning”.  This section covers a brief explanation of the types of machine learning. It has four main types which are:

  • Supervised Learning
  • Unsupervised Learning
  • Semi-supervised Learning
  • Reinforcement Learning

All these types are explained below. The detailed explanation along with other different machine learning types, basics, and algorithms will be covered in the upcoming blogs.

Supervised Learning

Supervised learning is a type of machine learning which learns from a labeled dataset by mapping inputs against their corresponding labels. In supervised learning, the input data and labels both are provided to the model for training. It learns and then evaluates its learning by comparing the predicted labels with the ground-truth or original ones. Then, the model tunes and optimizes its hyperparameters, and the training process is repeated again. This process continues until the model achieves the desired accuracy.

Suppose you have data of different plant species along with labels. The model learns the features of all plant species. Now when you’ll pass the features of some new species, the model will predict the class by comparing its features with the learned features and assigns it the label of that species whose features match with this new species. Now, in this case, both data and labels are passed to the model. Data is used for training whereas the label supervises the training process. Such a type of learning which takes both input and labels is known as supervised learning. Another example of supervised learning is shown in the figure below.




Fig 3. Block Diagram of Supervised Learning

The different images of triangles and rectangles are passed as an input to the algorithm which is then trained. The predicted labels are then validated against the true labels. If the results are accurate, the model is deployed otherwise retrained.

Unsupervised Learning

Unsupervised learning identifies and learns patterns from the unlabeled data. Unlike supervised learning, the learning algorithm is only provided with the input data. The model learns the internal representation of data on its own without having any external guidance and group the information based on similarities and differences among all instances.

Considering the same example like that in supervised learning. Suppose we have the same data of plant species but now, in this case, labels are not provided. The model is only provided with input training data. The learning algorithm will observe the color, height, width, different structures within the image. The images with most of the features common will be placed in one group. The one with different features will be placed in another group. That is how unsupervised learning works. Different algorithms for unsupervised learning will be covered in the upcoming articles.

Semi-supervised learning

You have observed that supervised learning requires a labeled dataset by a domain expert. Due to the vast amount of data produced daily, the manual labeling of data is tedious, time-consuming, and costly. On the other hand, unsupervised learning analyses the raw data which might take a lot of time. Semi-supervised learning is a blend of both supervised and unsupervised learning. It includes all such problems where only a small portion of data is labeled.  

Semi-supervised learning makes use of supervised learning to train the model using the small portion of labeled data. The predicted results are compared with the ground-truth labels and the model is retrained until the desired results are achieved. Then using unsupervised learning algorithms, it trains on the unlabeled dataset by analyzing common patterns between the different instances and group them based on the identified similarities and dissimilarities.

The data and the predicted labels obtained from unlabeled data are linked to the data and labels of the labeled dataset. By linking them, the model is trained.  Some of the common examples of semi-supervised learning document classification and audio analysis. The documents contain volumes and volumes of data in the form of books, magazines, scripts, etc., and labeling this vast amount of data is costly and a very time-consuming process. All such problems make use of semi-supervised learning.

Reinforcement learning:

Reinforcement learning uses the concept of agent and rewards to train the model. The agent has to achieve a certain goal for which it tries to maximize the reward. In this type of learning the agent interacts with a dynamic environment, takes actions through the hit and trial method. The model is then provided feedback in the form of rewards and punishments.

The main goal of the agent is to maximize this reward. Some of the common examples of reinforcement learning are robots, industrial automation, resource management, gaming, etc. You have seen a maze runner game where you have to reach a certain destination by finding a suitable both. In this game, you try all possible paths and find the best one which leads you to the destination. This is also an example of reinforcement learning.

This article covers the basic concept behind machine learning, its types, and brief descriptions. The detailed explanation along with the algorithms will be covered in the later articles. Let us know whether this article has cleared your concepts or not. If you have any questions related to machine learning types, basics, algorithms or you want us to cover any topic, let us know in the comments or Contact Us. It would be highly appreciated.

Leave a Comment

Your email address will not be published. Required fields are marked *