fsniraj
  • Blogs
  • Courses
  • Account
  • Blogs
  • Courses
  • Account
Privacy PolicyTerms of Service

© 2024 Full Stack Niraj. All Rights Reserved.

Understanding the Different Types of Machine Learning Systems: A Beginner's Guide

Niraj Dhungana
Niraj Dhungana•August 31, 2024
Share:
Understanding the Different Types of Machine Learning Systems: A Beginner's Guide

As I mentioned in my previous posts, I am currently a student of data science and machine learning. From what I've learned through various resources, there are many different types of machine learning systems. Understanding the problem we are trying to solve is crucial in selecting the right system.

Before choosing any system, there are a few key questions to consider: How will your data be supervised during training? Can the system learn incrementally or adapt in real-time? Will it learn by comparing new data points to known ones, or by identifying patterns in the training data to make predictions?

Supervised Learning

Supervised learning is a method of training a machine learning model using labeled data. Labeled data includes both the input features and the corresponding output, which is the information we want the model to predict. For instance, if we are developing a house price prediction system, we would provide the model with data that includes the features of each house—such as location, number of bedrooms, number of floors, and other factors that affect the price—along with the actual price of the house.

The model learns by analyzing the patterns and relationships between the features and the corresponding prices in the training data. Once trained, the model can then predict the price of a new house based on its features, using the patterns it has learned from the labeled data.

Unsupervised Learning

In unsupervised learning we don’t provide the labeled data, instead we provide the data and use the clustering algorithm to find the pattern from the data itself. This technique is helpful when we have a large amount of data but don't have labeled examples to guide the learning process.

Unsupervised learning can be used for dimensionality reduction, anomaly detection, data processing, or just to explore the pattern in data.

Clustering: is a technique in machine learning where the goal is to group a set of objects in such a way that the objects in the same group (or cluster) are more similar to each other than those in another group.

Semi-Supervised Learning

As we learned above, two common types of learning methods are supervised and unsupervised. Semi-supervised learning is a combination of both. It is used in situations where you have a small amount of labeled data and a large amount of unlabeled data. The goal is to use the labeled data to guide the learning process and make better use of the unlabeled data, improving the model's accuracy.

Imagine you have a small child whom you want to teach about fruits. You start by teaching the child about a few fruits, like apples and bananas (labeled data). Next, you show the child a basket full of various fruits (a mix of labeled and unlabeled data). As the child explores the basket, they may begin to recognize some of the fruits based on the features they’ve already learned.

Over time, the child will learn to identify other types of fruits from the basket. The child didn’t need you to label every fruit to learn; a few labeled examples were enough to help them identify the rest.

Some of the examples of unsupervised that we use in our daily life are speech recognition, Image Classification (Google Photos) etc.

Self Supervised Learning

Self-supervised learning may initially seem similar to semi-supervised learning, but it has distinct differences. In self-supervised learning, the model is trained using only unlabeled data, and the "labels" are not provided manually by humans. Instead, these labels are generated automatically from the data itself by creating a pretext task. This task allows the model to learn useful representations from the data.

For example, in image completion tasks, part of the image might be masked, and the model is trained to predict the missing part. The task of predicting the masked part acts as a form of labeling, but it's derived from the data itself. Once the model has learned these representations, they can be used in downstream tasks, often in a supervised setting.

In summary, self-supervised learning is a way to leverage the vast amounts of unlabeled data by creating tasks that generate their own labels from the data, allowing the model to learn in a supervised manner without the need for human-labeled data.

The term “pretext task” is crucial in self-supervised learning. Imagine you have a picture that you cut into several pieces, shuffled, and then gave to your friend as a puzzle to solve. The primary goal is to reassemble the picture into its original form, which is the pretext task.

As your friend repeatedly works on solving the puzzle, they naturally start to recognize different objects, shapes, and patterns in the image. Even though the main goal is just to solve the puzzle, this process helps your friend understand the content of the picture better.

Similarly, if a machine learning model were given this task, it would learn from the process of reassembling the puzzle. The knowledge gained from this task could then be applied to other images, helping the model to train more effectively on different tasks.

There is another concept related to pretext tasks called transfer learning. Transferring knowledge from one task to another is called transfer learning. Pretext tasks are used within the same model, typically on the same dataset, to help the model learn useful features by solving an artificially created problem.

On the other hand, transfer learning involves transferring the knowledge learned from one model that was trained on a specific dataset to a different model or task, often using a different dataset.

Reinforcement Learning

I think of reinforcement learning as a natural, human-like way of learning. In reinforcement learning, the model learns by receiving rewards or penalties based on its actions. If it performs well, it receives positive rewards; if it performs poorly, it receives negative rewards or penalties. The model's goal is to maximize the total positive rewards, which means it must learn to make the right decisions over time. This trial-and-error process is similar to how we learn in real life.

For example, if you've played any computer game, you've interacted with models trained using this technique, where they learn to achieve high scores or complete tasks by improving through experience.