Artificial Intelligence (AI) and Machine Learning (ML) are two popular terms often used interchangeably within the tech industry. However, it's important to note that ML is just a subset of AI.
This article will discuss the difference between Artificial intelligence and Machine Learning in greater detail. So let’s start with artificial intelligence first.
Let's consider the task of separating lemons and oranges into two separate buckets from a box containing both. Suppose lemons are lighter than oranges.
A human can easily separate the fruits just by looking at them. The question is: Do we always need a human to perform this task? In today's world, the answer can be no! We can reserve human intelligence for more complex problems and use it for tasks that require higher-level thinking.
The next question is: Can we train our computer to perform this task that requires human intelligence? This is where Artificial Intelligence comes in. It simulates human intelligence to perform tasks that typically require a human's touch. For example, we can create a robot that uses camera sensors to perceive images of the fruit, determine its weight, and then complete the separation process.
if fruit_weight > 20 gram:
place fruit in Orange bucket
else:
place fruit in Lemon bucket
So, Artificial Intelligence involves creating systems that can perform tasks that require human intelligence, such as visual perception, speech recognition, language translation, etc. In other words, the ultimate goal of AI is to build machines that can exhibit human-like intelligence and capabilities.
Machine Learning is a subset of AI that focuses on the development of algorithms and statistical models that enable computers to automatically improve their performance on a specific task through experience. It involves training the machine using large amounts of data, allowing it to identify patterns and make predictions or decisions without explicit instructions.
Let's take the previous example of segregating fruits in the bucket of Lemon and Oranges. Suppose we hire someone for ten days to segregate fruits and also keep track of the data from the segregating process. This data will be used to train a machine-learning model.
Here person is responsible for creating a folder on a computer that will contain images of the lemons and oranges and an excel sheet. The first column in the excel sheet will be labelled "Filename," and the second column will be labelled "Fruit Name," indicating whether the fruit in the corresponding image is a lemon or an orange.
After ten days of sorting fruits, a large number of images, along with their labels indicating whether each one is a lemon or an orange, will be stored in the folder and excel sheet. Now hired person is no longer available as the budget does not allow for further payment. But the task of separating the fruits into lemon and orange baskets must still be done.
This is where machine learning comes in. This time, we want computer to be even more advanced and closely mimic human intelligence. That is, we want a technique that can look directly at the fruit and make a prediction about whether it is a lemon or an orange, based on its learning from previous data.
In this scenario, our computer will use the collected data to identify patterns. It analyze each image and find a function that would take a new image as input and determine whether it was a lemon or an orange. This is an example of machine learning, which is defined as "a science for getting computers to act without being explicitly programmed".
In other words, machine learning allows computer to learn from existing data and make predictions for future scenarios. So, machine learning is a subset of artificial intelligence that enables the creation of more advanced systems that don't rely on explicit programming.
The question of whether Machine Learning is better than AI is not a straightforward one as it depends on the requirement of a specific problem. For example, let's consider a self-driving car. It would also need AI technologies, such as computer vision and natural language processing, to perceive its surroundings and comprehend human speech. However, in order to make decisions, such as determining the best route, the car would utilize Machine Learning algorithms that analyze data, such as traffic patterns, road conditions, and previous driving experiences.
In this blog, we have explored the difference between Artificial Intelligence and Machine Learning. To make the comparison more engaging, we have used a problem of sorting fruits in baskets of lemons and oranges. In the final section, we also provided examples of real-life applications of AI and ML. If you found this article informative and enjoyable, please leave your feedback or suggestions. Enjoy learning, Enjoy algorithms!
Subscribe to get well designed content on data structure and algorithms, machine learning, system design, object orientd programming and math.