Introduction to AI
What is AI? What is Machine Learning? What is Deep Learning? What is Fine Tuning? All your questions answered
Artificial Intelligence and Machine Learning
AI, or artificial intelligence, is the idea of building machines that can think and act like humans. It's kind of like building a really smart robot that can do all sorts of amazing things.
For example, imagine you have a robot named "Robo-Sue" that can play chess. You tell Robo-Sue how the chess pieces move, and then you let her play against a human. After playing for a while, Robo-Sue starts to learn how to make better moves and eventually becomes a really good chess player. That's AI - using machines to learn and improve over time.
Machine learning is one way to achieve AI. In machine learning, you give a computer a lot of data and let it figure out how to solve a problem on its own.
Programming Vs Machine Learning
Programming
Okay, let's start by explaining that computers are just really big calculators that use electric voltages to do their calculations. In order for a computer to do anything useful, you have to tell it what to do using a special language called a "programming language."
Programming is like giving a computer a set of instructions to follow, just like you would give a recipe to someone who wants to make a cake. For example, let's say you want to make a program that prints the words "Hello, world!" on the screen. You would use a programming language to write a set of instructions that tell the computer what to do. When you run the program, the computer will follow your instructions and print the words "Hello, world!" on the screen.
Similarly you could write a program to find whether a given number is odd or even.
Here you can see that a simple problem which can be solved by a human easily needs to be explicitly well instructed to be solved by computer.
Machine Learning
Machine learning, on the other hand, is a way of teaching computers to do things without explicitly programming them. Instead of giving the computer a set of instructions, you give it a lot of data and let it figure out how to solve a problem on its own.
For example, let's say you want to teach a computer how to recognize different types of animals in pictures. You could give the computer a bunch of pictures of animals, each labeled with the correct animal it contains. The computer would then use this training data to learn how to recognize different animals in new pictures it hasn't seen before.
So, in a way, you can think of programming as telling a computer what to do, while machine learning is more like teaching a computer how to learn. Both are important and have their own uses, but they are different ways of making a computer do what you want it to do.
Understanding this Programming vs Machine Learning difference is a crucial thing when starting to work on any new ML projects. If you can solve a problem by simple programming, using ML is a waste of time. But if a problem can not be solved by programming due to its complexity, then you can build ML models to solve them.
Which method to use?
-
Problems where ML is beneficial
- Image Recognition (an image will have millions of pixels with different colors. hard to solve using simple programming)
- Sentiment Analysis (hard to predict the sentiment using programming)
-
Problems where programming is beneficial
- Calculating square root of given number
- Finding email id in text (use regex)
Deep Learning
Deep learning is a type of machine learning that involves using artificial neural networks to learn and make predictions or take actions. Neural networks are a type of mathematical model that is designed to mimic the way the brain processes information.
In deep learning, these neural networks are designed to have many layers, which allows them to learn complex patterns and relationships in data. This is what makes deep learning "deep" - the multiple layers of the neural network allow it to learn and understand data at a deeper level than other types of machine learning algorithms.
For example, imagine you have a deep learning algorithm that is trying to learn how to recognize different types of animals in pictures. The algorithm might start by analyzing the colors and shapes in the pictures, and then use this information to identify simple objects like circles and squares. In the next layer of the neural network, the algorithm would look for patterns in the objects it identified in the first layer, and use this information to identify more complex objects like eyes and noses. In the final layer of the neural network, the algorithm would use all of this information to identify the animals in the pictures.
This ability to learn and understand data at a deeper level is what makes deep learning algorithms so powerful. They are able to learn and adapt to new data, and they can improve over time to make more accurate predictions or take more effective actions.
The name "deep learning" comes from the fact that these algorithms use multiple layers of neural networks to learn and understand data. This is similar to how the human brain processes information, with different layers of neurons working together to understand the world around us. So, in a way, deep learning algorithms are trying to mimic the way the brain works in order to learn and understand complex data.
Deep Learning is becoming more and more popular because it can learn from data in a more complex way than traditional Machine Learning. It can also be used to solve problems that traditional Machine Learning can't, like recognizing objects in images or understanding natural language.
Finetuning
Finetuning is a technique used in deep learning where you take a pre-trained model that has been trained on a large dataset and make small adjustments to it in order to improve its performance on a specific task. This allows you to use the knowledge and experience that the model has already learned to help it learn the new task more efficiently, even if you only have a small amount of data for that task.
This is similar to how humans can use their knowledge and experience to solve new problems without the need for a lot of examples. For example, if you know how to ride a bike, you can use that knowledge and experience to learn how to ride a motorbike without the need for a lot of examples. Your previous knowledge and experience gives you a starting point, and you can use that to learn the new task more efficiently.
Imagine you have a pre-trained model that has been trained to recognize domestic cats based on pictures of their faces.You collected a huge amount of cat pictures from the internet (who doesn’t love to post cat pictures) and used them for training this model. This model has 97% accuracy. Now you want to create a new model that recognizes wild big cats like lions and tigers. But you do not have a huge amount of pictures of wild cats. To tackle this problem, you could use finetuning to improve its ability to recognize wild big cats. This would allow you to use the knowledge and experience that the model has already learned from recognizing domestic cats to help it recognize wild big cats more efficiently.
So, in a way, finetuning is like giving a deep learning model the ability to learn new tasks more efficiently, just like humans can use their knowledge and experience to solve new problems more efficiently. It's a powerful tool for making deep learning more efficient and effective, and it's an important part of the training process.