Machine Learning Basics
Hey, I am Manikanta. Today, we will try to discuss machine learning basics. So, what is machine learning? It is a field of AI that allows computers to learn from data. This is the basic definition that we can get via ChatGPT or whatever AI model we are comfortable with. But what do we benefit from giving data to AI and making the computer learn from that data? That we will discuss now. We will train an AI algorithm, which is known as the "Model," by giving it the data to find patterns between the data. This will help us to predict the future from the existing data, classify the data, and create something relevant. What is the use of training these "AI models"? Even a person with basic knowledge can do those jobs, yes, but not with the speed and scalability these models can do them. Today, we will learn something about how these "models" work. So, there are three types of learning in artificial intelligence. We will get to know what they are in the coming days, but I will give you a summary of each in this one.
Supervised Learning: Whenever we are trying to do something, we know what we are doing that for. In technical terms, we will have the features and the target. In other words, we will know both input and output. What are these features and targets? Do not worry; I will explain it to you with an example. Let us say there is a cricket match happening to win a particular match. What are the features? Good batting lineup, Good fielding, a Good bowling attack, and perfect strategies. If we have all these features, our target will be a win. If any feature is lacking, there can be a chance of changing the target variable. For this, if we have data from previous matches with these features and targets, we will call that a dataset.
For what is this supervised learning used?
Classification, Regression. Oo, unfamiliar terms again.
Classification is about trying to separate which class the given new sample belongs to, like if we are trying to classify whether we pass an exam or fail.
Regression is about predicting continuous values based on the input. Like temperature forecasting for coming days and house price prediction.
Algorithms based on supervised learning:
Decision trees, random forests, linear regression, and logistic regression.
Unsupervised Learning
Unsupervised learning is something that trains on unlabeled data. Here ,we will work only with features, not targets. Allow me to explain to you with an example.
Let us say I have collected data from a group of people where I collected their interests, hobbies, and goals. Now I can try to group people by using available clustering algorithms. Similarly, we also have dimensionality reduction, which will try to reduce the number of features that will help the model to train on important data, which reduces computational time.
Algorithms based on unsupervised learning.
K-means clustering, hierarchical clustering, and principal component analysis.
Reinforcement Learning:
This will be interesting. While training a model using reinforcement learning, there will be an agent in the model who will continuously monitor the performance of the model. Whenever the model is performing well, it will give a reward; else, it will give a penalty to the model so that it corrects itself.
For now, let us assume a dog. While we are training a dog, the trainer will give a treat to the dog when it performs the trick properly; otherwise the trainer will correct the dog. In this process, the dog will learn and do what the trainer says for treats. In the same way, the agent tries to train the model using a reward/penalty basis.
Algorithms based on reinforcement learning.
Q-learning, policy gradient methods.
I tried to mention everything that can be useful for everyone to understand these basics well. In the coming blogs, I will explain each of these learnings with real-world examples with codes.