# Supervised Learning

Supervised Learning – Supervised in basic terms. It’s like you need to observe and direct the execution. So you have to observe something & direct the execution now who will delete the execution and observe its the user who will be observing and directing the execution now in this someone needs to learn this supervised technique. So who will that is the algorithm? So the machine learning algorithms, it should basically employ in order to train your model.

Basically, those algorithms learn from the label data nowhere one term is the labelled data. So you will be many times will be encountered in machine learnings. So label it is nothing but say for example, if and some points like this and say for example if I have points like this, so This I have labelled into something red points in something in black points. So this is labelled data and if I have some data like for example say this but This has got no colour.

So this basically becomes unlabeled data. So those are basically labelled and unlabeled data. So in supervised learning the basically use this label data in this can be in any form like you can put some labels or some glass or some plus-minus notation something like that.

So what this basically does this after understanding the data the algorithm will determine it’s first the algorithm will read the data with her how the data is and to what label it should be assigned and then new data item will be formed and the associated data patterns will be given to the unlabeled data which are there in the test set now you need to understand two major things is this so whenever in machine learning you have this thing that is it will be a data set.

So this data set or in supervised learning about machine learning you will have data in our table format like you have rows and columns. So you have many rows and many columns it will be of massive size. Now what we basically need to do is in this you just divide this data set into two parts. So one is the training set. The other one is test it. So this division is basically on the discretion of the analysis that is the data analysis. So basically you do either of 50-50 % per cent or you want two-Third on one-third that is you give a two-third portion to the training set.

Wonderful deep ocean to testing. So, for example, keep 67% to the training set and we have around 33% for the test set. Now what this basically does is it will take the training set and it has got set of some Target variable. So target variables are basically response variables.

Which you know for which you try to predict the output now, our main goal is to map the input to the output next is one particular kind of input comes then it’s output should be what now, the user will know what the user will have the idea like if this data comes then what’s the output but you need to incorporate into the machine.

So that’s why we use supervised learning this so This majorly has a task of deducing a function. from the labelled data, so it can be like that if you have some function so it will try to predict some function like f of x is equal to x squared or it can be like 3x plus 2 like the X variable has to be first multiplied by 3, then it is to be added into or it can be used to make predictions based on the evidence of the presence of uncertainty. Like for example, you have some credit card fraud detection.

So in that, you don’t have much certainty about like whether those cards have been got manipulated or it was being compromised. So what you do based on the evidence each other. Are you try to predict it? So if basically in cards systems.

Next, it identifies the patterns in the given data with some adaptive algorithms. Now, for example, if you apply one algorithm, it will try to predict or will try to create some patterns. Say for example that item one now tomorrow is this party needs to be refined. We need to apply another algorithm. So that will give us to pattern N so for that basically we use supervised learning now, the basic idea of why supervised learning is done.

It predicts a value for known targets means you already know what kind of input should be given and based upon that you will know the outputs which are there so user inputs with known access to learn now. He puts those things into the machine and the Machine tries to guess those particular data like to if data one comes as an input if you would user will check whether this input 1 is assigned to that particular output or not. So if this is so then you can say the accuracy of your model is correct now based on what you do this that is supervised living so it assumes planned something has happened before and it will get repeated in the future again.

Without not much drastic change and we’ll provided it all the factors remain constant so we can be set like you have say, for example, you have an exam today and you failed that exam. Now again, you have a retest of that exam and you know, like what happened previously that you feel so you try to prepare it and go but the scenario is like the examiners just change the versions of that test.

So it’s like They have changed the scenario but you predicted or you thought like the same scenario would happen again and again, so it basically assumes that the supervised learning has got two major branches like you have one classification and regression classification really does the categorization of outputting some unique bucket.

So you can be discreet boolean other categorical and refinishing basically estimates The Continuous values for real or group. So Numerical values So basically this os numerical values and in this you have nominal categorical, etc. Etc. Now how the working of the supervised learning is done. so basically supervised machine learning algorithm is divided into two parts for it first runs. The learning that is with the help of the training data you either learn a model or you train a model using the training data. It’s like for an example say you have student and a teacher teacher. Now.

This teacher wants to check whether the student knows the particular answers on is he prepared for the exam. So firstly teacher will try to train that particular student with all the available data and resources now the student has to be tested. So the student doesn’t know what all access or what all questions would come in the exam So based upon that student will be evaluated on the exam.

If he gets a good score, then he has a good percentage or good accuracy. So this basically Works in peace two steps that is the learning phase and then you have the test phase now, for example, let’s consider this scenario an example. For example, you have a fruit basket data set and you have a certain set of features like the size, colour. Then you have the weight, skin type and shape. I’m taking this so this is an Apple. So first it will check if the color is red. And if the sizes medium and the shape is round and it has depression at the bottom that is true and depression at the top. That is true.

Then this will be assigned to label one or set one now more validation is that if the skin type is smooth and it is shiny. On this label 1 means this entire set, then you assign to label 2 now after this we get assigned to the class of Apple. Now this case this an orange. So at the very first them the color is red. So it becomes false and the size is medium. No, it’s large and be shape is around here. That’s true. But we have depression at the bottom. No, it’s still around and at the top also, It’s not depression.

It’s a flat surface. So this condition fails and this doesn’t gets into the category of Apple goes with the category of orange. So this is how the supervised learning basically learned from the input data and tries to classify the particular data and tries to predictive model and it gives accuracy so well, that was all regarding the supervised learning in machine learning.