#1 What is Machine Learning? AI vs ML vs DL & ML Pipeline Explained | Codingdidi

Akansha Yadav explains machine learning basics: how AI, ML, and deep learning differ, the three learning types (supervised, unsupervised, reinforcement), and the full ML pipeline from data collection through deployment. She recommends NumPy, Pandas, and scikit-learn as essential tools, and suggests playground.tensorflow.org and Teachable Machine for hands-on practice.
Chapters
Hi, I'm starting a series for machine learning for beginners, those who don't know anything about machine learning. Even if you don't know about M in machine learning, you can follow this series. This is going to be a premium series because I am going to deliver all of the things which are required for you to become machine learning engineer, artificial intelligence engineer, or anything in these related, right? So we will talk about what is machine learning, how does it works, types of models, how to create those models, how to deploy those models, and what type of hackathons or codeathon that you have to apply for. And after completing this series, I am also going to tell you how you can utilize these skills to earn. So I hope you're excited for this series. So let us begin with understanding what is machine learning. Before we enter into the world of what is machine learning or their, you know, standard definition, let's first understand where exactly you guys have experienced machine learning. If I talk about machine learning in our day-to-day life, you have experienced it everywhere. Literally, I'm starting your day Whenever you wake up in the morning, you use your phone and the phone gets unlocked with the face recognition feature, right? So that face recognition feature is built using machine learning. Second, when you go out from your home and you try to, you know, reach your office, let's say. So when you want to go to your office, you have to predict how much time will it take. 1 hour, 2 hour, 2 and a half hour, right? So this we generally track via Google Maps, and Google Maps predicts the traffic via machine learning. Third, when you scroll Instagram, the next reel that you would love to watch is recommended by the Instagram using your data, using the machine learning. Yes, everywhere you are experiencing machine learning. In your mail, we have a spam folder. How does that spam folder gets created or the mails added in it? Using the machine learning, obviously. Yes. So what is the difference between traditional programming and— if I talk about traditional program, in traditional programming we write a set of rules, right? Maybe 50 rules to create something, to, you know, create those login or signup pages of website. Yes, that is traditional programming. When it comes to machine learning, we try to give our human intelligence to machine so that machine can also predict, learn patterns, have experiences, and can also give you your next— can also help you in decision making. All these companies are using machine learning to make their next step more fruitful and and to also make more profit, right? So we will be creating all the machine learning model from scratch, and also I will be also helping you with how you have to relate mathematics. So many of you are struggling with mathematics in machine learning, where exactly the machine learning needs the mathematics, right? So I am going to tell you each and everything from scratch. So if you don't know anything, trust me, you just have to follow this and follow these. Number 1 is to have the consistency. And while you are watching the video, you have your pen and paper ready, or your notepad, or your sticky note with you, and start writing this. Second is to practice. Practice makes a man perfect, we all know that. But you also have to follow this. You know that, that is fine, but you also have to follow this, apply this in your life, right? So these two things are required, nothing else. And if you have computer, obviously. Let us begin with what is machine learning. So I'm going to start with the standard definition of machine learning. But before we jump on to the definition, for must understand this bubble, which you might have seen so many. If you're scrolling Facebook, if you're scrolling Instagram or YouTube, you might have seen this big bubble which says these are the categories. Now what are these categories? Many people are confused with AI, ML, and you know the DL, right? Deep learning. Now what about AI? AI is artificial intelligence. Yes, we are creating artificial with the help of machine learning. We are creating artificial intelligence, but to get that machine learning You have to understand AI use. AI is a fancy— AI is like fancy words addressed on machine learning models or deep learning model to make it look good. That AI is just a fancy word, nothing else. What works within AI? What is the brain for AI? AI has brain like ML models and DL models are the brain of AI. It means what works behind the scene of AI is machine learning model or deep learning. What is difference between machine learning model and deep learning model? As the name says, we are trying to build a classical model, machine learning models. That is classical model. It means standard models like creating classification, regression, or anything which is basic. Now the second is deep learning, creating a human-like brain with neuron. It means neural network. You might have heard about neural network is a part of deep learning. So when you create deep inside something, that is, that comes under the deep learning models, right? When you are trying to create something basic like categorizing your mail into spam and not spam category, machine learning model can help you with that. These three are the terms which are very, very effective in these era of 2020. And you have to understand, AI is just fancy thing. What you have to learn is machine learning and deep learning. Now let us jump on to the next concept. So what is the next? Obviously the standard machine learning definition. What does the standard machine learning definition says? It says that machine learning is just a way to teach computer to learn patterns and make predictions. First, machine learning can predict what will happen next, just like in stock market when we try to predict what happened next. Should I sell this stock or buy more? So one is prediction, second is pattern. With the pattern only we can make the prediction, obviously. With the pattern only we can make prediction, right? So machine learning can do, do these two things without being explicitly programmed. Yes, as I told you, in traditional programming what we were doing, we were defining the set of rules and getting something accomplished, right? But in machine learning we do not. In machine learning we train machines in that way that, okay, once it is trained, once it is deployed, it will make prediction on the new data, new unseen data. It will work without getting programmed. So every time when you use ChatGPT, you are not getting, uh, you know, you know, you are not programming, right? Even you are using it for programming or learning programming or, you know, completing some other task. So it means we have already created the model, now it is time to utilize it on new unseen data. That is what happens. Understand machine learning from from the children's perspective. As a childhood, like as in when we were kids, right? How we were trained? We were trained by a mentor. How we were trained? We were trained by a mentor. So what mentor used to do? Mentor used to, teachers used to tell us that, okay, see, this is A, this is B, this is CAT, CAT. So basically what we were getting from the mentor is we were getting value, which is input, that okay, this is A, this is CAT. But how do we get to know that, okay, this is cat? If, if let's say the teacher is trying to show that, okay, this is a bookshelf, how do we get to know that this is a bookshelf? Because our teacher has taught us that, okay, this is a bookshelf. It means we are getting the data, we are also getting the label that what exactly this is called. So just like our teacher used to tell us, right, this is a chair, this is a cat, this is a cow, right? So whenever we were getting trained, we were shown a picture and told us that, okay, this is the data and this is the name, this is the data and this is the name. So what we are trying to do at that point of time is we are learning, we are learning under someone's, you know, supervision. So we do the same thing in machine learning. Classical machine learning models works same way. We have to give the data, we have to give the label, and when we give both of the things to machine learning models or any other algorithm, it gets trained onto the same pattern and tries to predict what does the next thing says. Now we will understand it in depth, do not worry about it. Now let us move on to the next As I told you, what happens within the machine learning model? How does machine learning model work? In simple, a machine learning model works with the data. We have to train it with the data. Just like we can now speak sentences, same way for speaking the sentence we need alphabets, we need words, right? We need grammar, everything we need, right? So we have to get the input for the model. An input can be raw data and labels. It means, as I told you, if I'm showing a cat image. It means I have to also make, uh, my model understand, okay, this is an image of cat, this is an image of cow, everything, right? So this is input part. Now next comes is the process. What happens behind the process is we use the algorithm. Algorithms are like— you might have heard about data structures and algorithm, right? We write set of rules, we have set of rules to apply, right? But in machine learning, we use Python library to create algorithm. We will talk about this in the whole series, that how you can create different type of algorithms in models. And then after getting it, model tries to learn the pattern. Model tries to learn the pattern. What is the pattern? Pattern is nothing but ML, which is machine learning, tries to learn the relationship between X and Y. What is X? Input. And Y? This and this. What is the relation between this? What is the relation between this, right? Whatever is the relation between this, this is what the pattern is. And after learning the pattern, whenever we give our model the new unseen data. What model will do? Model will try to make the prediction. Model will try to make the prediction. For example, let's say I am training a child. Let's say I am training a child. I am saying that, okay, the animal who have 4 legs, the creature, basically the creature who have 4 legs are animal. So what is the criteria that I am training on with? I'm saying that whoever you see, 4 legs— elephant, lion, everyone has 4 legs. Whoever has 4 legs are considered as an animal. So that is what I have tried— I am trying to train. Now what children will understand, what the child will understand is child will say, okay, ma'am told me that, okay, 4 legs, right? So whenever I will, you know, give multiple images, I will show cow, elephant, many different images, and I told that, okay, this is an animal. And this is how animal looks like. Only one thing I have told. Now, now my model, my, my, like, that child particularly get trained on the same data. Now whenever the new data will come up, it means I'm trying to show some new creature from this world. Obviously, maybe this is the case that children, the child won't be able to, you know, understand, that won't be able to, you know, guess whether it is an animal or which type of creature it is, right? So this is also a possibility. Possibilities. So it is not like 110% it is going to be correct. No, model can make mistakes because model is learning. So what we will do, we will train that child again. And now I will tell that, okay, 4 legs are not compulsory. There are more things that we have to look. Maybe that creature is not speaking like humans, so you can consider that as an animal. Or maybe I can give more different, you know, features about animal train that child, then there is a possibility that the children— that child will also be able to predict and guess it correct. Same thing happens within the machine learning. We give data, we give it to the brain basically, and then there is a pattern recognition which happens. After pattern recognition, whenever new data comes into the picture, the model try to predict it, and it is not compulsory that it is going to be 110% correct. There is a possibility that maybe model makes 5% mistake, 10%, 20%, or maybe 50% also. This is how machine gets trained on, right? So it is all about learning the pattern and working on the new unseen data and seeing whether model can make. Now what happens behind the scene? What happens within the brain of machine? Obviously brain need mathematical equation. So this is a mathematical equation which is generally used in any of the machine learning model. This is just from the outside, I'm trying selling, okay? This is y bar f . We try to minimize theta so that our error reduce. Now I will tell you in detail what does this equation says. f , what is this? So very first thing is the predicted value. What is the predicted value? This y bar is the predicted value. Now as I told you, we give input, input features, right? Whatever input features are like for 4 legs, skin texture like this and all are input feature. Now comes the model parameter. What is the model parameter? I was training that child, I was telling that 4 legs means animal. The 4 leg was that, you know, highlighting things. I was getting— I was adding the spotlight on that word that, okay, 4 legs is the feature, right? So that weightage, that how much that weightage is, is the model parameter theta. Then the actual value and the losses and the number of val— the number of samples I'm giving. Like, let's say I just trained the child on 5 images, it means 5 number of samples, and the losses that model makes, and the actual value is what exactly I have provided, right? Look at this, okay? I have summarized this in this. Now, what is Y bar, which is the predicted one? What is predicted by the model, which is not the actual value but unseen data or prediction by the model? Now, with the unseen data, how the prediction happens with the input feature and the weightage. What is the weightage? Weightage, as I told you, the spotlight on what is the value of this. Like, let's say success is something which has more value in my life, so it means success is a word that has more spotlight on my— more weightage, basically. So that is the same case as in the machine learning model. So weightage is when we try to emphasize something, when we try to mention that, okay, this is more important, or this has more weightage, right? So that is weight, and we try to reduce that weight. We try to change the weightage. When I'm talking about features of animal, so I can tell that, okay, these are the 5 features, but what are more important is 4 legs and this type of skin texture, and this is a language that you might find in any of the creature. So what I'm trying to tell is I'm trying to get onto the— so whenever we talk about, you know, getting something more weight, the model has the tendency, you know, to change the error or the losses. So that's how we reduce theta. We will talk about mathematics more whenever we will create the model, but for now just understand that whenever we provide machine learning model any data, we also provide the weightage. And whenever model makes any mistake, we change that weight and see how model is behaving with that changed theta or changed weight. Now there are multiple different type of machine learning models. There are 3, basically 3 containers, 3 categorization for machine learning model. The very first is supervised learning, second is unsupervised learning, then reinforcement learning. These are the three containers in which all the models get categorized. First is the supervised learning, second unsupervised— I'm repeating— and third is reinforcement. Let us move on to understanding what is supervised learning. Supervised learning means teacher and student, how teacher trains the student under the supervision. When we have the mentor, when we have the teacher, we know where to go, what to learn, what is the roadmap to follow, what are the tips and tricks, everything we know, right? Same thing happens within machine learning, supervised learning model, where we have the data with labels and the model can easily understand what is it, what is the correct answer, and on the basis of the correct values, model can predict it. For example, if I am showing this image saying that this is an apple, model can easily learn it, right? But there comes the next one. What is the next one? Which is unsupervised learning, in which which the data has no answers. The data has no answers. It means I'm not telling that this is an apple, or I'm not telling that, okay, this is— what does it mean, right? So we will just provide the data. Raw data is, you know, filled within the model, and the model automatically understands the pattern and the structures. And that's how unsupervised machine learning models works. And the third is— wow, let me just get it back. Yeah, the third which we have is reinforcement learning. Now, what is reinforcement learning? You might have played chess game or any other Ludo type of game or any game that you can play with computer, basically I wanted to emphasize, right? So reinforcement learning is something where we try, we try to train our model on the basis of trial and error. It means there is a model and that model gives the output. Whenever model gives the output, what we do is we give feedback. What we do is we give feedback. We work on two things. Either we will reward that model, or either we will give that model a penalty. Only two things. Reward, let's say I'm giving 10+ points, right? Let's say I'm doing— I'm giving that model +10 as a reward, 10 points, and penalty as a -10. So on the basis of this +10 and -10, reinforcement learning models get trained. Got it? I hope it is easy to understand. Next is, how do we create any machine machine learning model? To create any machine learning model, we have to understand the pipeline. What is the pipeline? Pipeline is from starting to end what all is required. Now, very first thing which is required for the machine learning that we have been discussing since the beginning of this video is for model and data have multiple sources. You can collect the data from wherever you want. You can collect it from YouTube comments, you can connect it from Facebook comments, you can connect it from— collect it from Instagram, and even you You can use any survey, Google Forms, or web scrapping, right? Website is also one source for the data. So we have to first collect the data. After collecting the data, the next step is preparing the data. Obviously, the data is going to come from multiple different sources, and different sources have different data types and structure. We have to prepare the data, clean the data, and make it in the good format like CSV format, CSV format, Excel format, or any other format. And then train the model. After training the model, after giving it to the model and making that model understand that, okay, this is the pattern and all those things, we have to evaluate the model that whether whatever the prediction model is making on unseen data, is it correct or not. If it is not correct, model is giving some error, then retrain it and then evaluate it, retrain it and then evaluate it, and then come to the point of deployment and prediction where we deploy our model and provide the unseen data to test it in the real environment. So this is how any machine learning models are created. Now the next thing that we are going to discuss is the libraries which are required. Now there are multiple different libraries that you might have heard on Google, internet, right? But these 5 are the one which you have to focus on. You have to just focus on these 5, starting from NumPy. NumPy is for numerical computing and arrays. It means when you want to perform any mathematical operation, NumPy is important. When we talk about data, we talk about rows and columns in Excel sheet, and that rows and columns are— can be, you know, imagined like a vector machine. Like in maths, we have matrix, right? So NumPy is very important when you wanted to work on maths operation. The second library which is very important is Pandas. Now what is Pandas for? Pandas is for data loading and preprocessing. Doing when you wanted to clean the data. Because as I told you, when the data is coming up, coming from different, different sources, we have to make it perfect for the model and do the data cleaning. Then comes scikit-learn, right? SKlearn library. This SKlearn library has all the models. You can even create any machine learning model within 10 lines of code, but you have to understand how those 10 lines works, which type of model you are creating, how to optimize that model better. If the model making mistake, what to do in that case. So that is why I say you have to understand fundamentally. Then sklearn is a library, we have ML algorithm, all the beginner intermediate level models you will find in this library. Then comes the SciPy library, which is for scientific computing, which is built on top of NumPy to perform any optimization and, you know, statistics kind of term. Then comes the model deployment. For model deployment, Joblib is the library which will help you to to save and load your models. So I hope you have understood each and everything which is required for the basic stuff. Now there is a bonus point for this video, which are 3 different websites. Now this is a website for neural network. This is the website for neural network. All these ChatGPT LLM models are all deep neural network models. LLM, large language models. If you wanted to experience how does those model work or if you wanted to experience how classification model or regression models are created, how do we have to train them, what should be the learning rate, how exactly behind the scene things works, then this is the best website to go on: playground.tensorflow.org. There is no promotion for these kind of websites, this is just a bonus part of these videos so that you can learn machine learning more effectively. Now this is one of them. The next one is Teachable Machine. And then what we have is the next library— the next website is mlplayground.in. If you will go on to this website, Machine Learning Playground, you will find different problem statement to understand mathematics, to practice machine learning, and to also get your hands-on experience on these websites, right? Get hands-on experience on machine learning, basically. So if you wanted to understand how does stable softmax function is is calculated, how to create it, and all those things. Basically, there are different problem statements that you will find on this website, and according to what you are learning currently, you can go get the problem statements and practice them. So this is very, very good way to, you know, learn how we practice data structure and algorithm. Same way you can go on to these websites. The next one is this website where you can get image project, audio project, and post project. This is basically, this Teachable Machine website. In this Teachable Machine, basically this website is generally these days used to, you know, make children learn about machine learning. And this is a very good way to, you know, experience how exactly image project or audio project has to be created within machine learning. So yeah, that's it. So I hope this introduction part of machine learning or phase 1 of machine learning series helped you to understand what exactly machine learning is, how it works, and the basic understanding, basically. And if you feel that there has to be something more in this video, do let me know in the comments. Or if you like this video, do let me know in the comments too. And like, share, and comment as much as you can so that this videos can help others also to understand machine learning. So happy learning and keep growing.










