Machine Learning Algorithms | Machine Learning Tutorial | Data Science Training | Edureka

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is a man from Edo Rica today's session is going to be on machine learning algorithms so without any further ado let's move on to the agenda to understand what all be covered in today's session so we'll be following a top-down approach we'll start from the basics and understand what is an algorithm and how it can be used in machine learning after that we'll understand what is machine learning exactly and how a problem can be solved using machine learning after that we'll be discussing various technique using which a machine can learn and after that we'll also be discussing some of the basic algorithms which are used in machine learning towards the end we'll be doing a demonstration where and we'll see how we can prepare a data set for the creation and validation of a model and after that we'll be creating a model using one of the algorithms that we'll be learning today alright so guys this is our agenda for today are we clear with it okay I'm getting confirmation so current is clear so assuage Matthew alright guys since most of you are clear let's move on to the first topic of today's discussion that is what is an algorithm so let's start this topic with a very generic approach so if you were to interact with the computer and tell it how it should execute a particular task the way you do it is using a program right so what is a program a program is basically logic which is wrapped around a syntax a particular syntax which is specific to a programming language now this programming language could be anything it could be is to have a script it could be Java it could be Python it could be C it could be C++ whatever right but the basic thing doesn't seem that is the logic alright the logic remains the same in every language having said that what is this logic this logic is what an algorithm is alright so in simple words and algorithm is a step by step procedure towards solving a problem in the computer world all right so let's take an example to understand this thing which you exhaust discussed all right so let's take an example so this is a problem or this is an algorithm to print numbers from 1 to 20 right so let's go step by step and understand what this algorithm is doing so this is the start position we start over here and then we see that our algorithm is initializing a variable X to 0 all right so we initialize a variable X to 0 and then we implemented it by 1 after that we are printing that variable and we are checking it whether it's less than 20 so if it's less than 20 if it's true or if it's yes it goes back and increments the value again by 1 otherwise if it's unknown it goes on and into program right so since it's a yes right now it goes back and increments the value by 1 again so we are printed 1 and now we have incremented the value of x by 1 again so now the value is 2 and then we print that value so we have now 1 and 2 on the board all right then again it checks whether it's less than 20 if it's true it goes back again incremented by 1 now it's 3 prints see so this process goes on until the value of x reaches 20 so when the value of x is 20 it prints that value and it checks whether it's less than 20 which is unknown and then it ends the program and hence you have values which are printed from 1 to 20 all right so this is a step by step procedure for printing values between 1 to 20 and this is in similar way you would create other algorithms as well so as complex an algorithm can be it can always be represented using a flowchart all right so guys this is what an algorithm is now our next topic is what is machine learning now for making a machine learn there are a lot of ways and there are a lot of algorithms right now since no problem is the same every problem so if it takes all case alright so we tackle every problem with the different approach now algorithms are nothing but approach for a computer right now based on the problem you decide which algorithm to use right so for now let's understand what is machine learning so machine learning is basically an artificial intelligence wherein the machine can learn on its code meaning we were programmed at once but every time it encounters a problem it should not be programmed again that doesn't mean motive of ours right it will not be programmed again it changes its own code according to the new scenarios it discovers all right so this is what machine learning is it self learns whatever has to be learnt from it we provided scenarios will be provided with past experiences we feed the values and learning from those past experiences it comes up with new solutions this topic is actually very interesting to learn about because you might be thinking how a machine can actually redo its code or how can it update its its code on its own right so sounds interesting right so this is what we'll be doing in the next few sessions that we'll learn about machine learning so today's session is going to be a very basic session we'll be seeing how much in learning actually works what is the basis for machine learning alright so by the end of the session you will have a fair idea of how things basically work with machine learning but for the advanced part of machine learning we have the next sessions lined up so I don't want you guys to miss any of those sessions all right ok so moving ahead now so we have learned what machine learning is but like I said there are different approaches towards solving a problem right so there are basically different ways a machine can learn let's see the different ways a machine can learn basically there are 3 kinds of ways so the first way is supervised learning the second way is reinforcement learning and then you have the unsupervised learning right discuss each of these in detail and understand what these actually are so the first kind of learning is called supervised learning all right so what is supervised learning so supervised if you concentrate on the word supervised supervised means when you are monitoring someone or when you're constantly monitoring someone or making them understand something so you can compare the scene with a classroom scene right so you sit in a class and the teacher explains you difficult concepts right the concepts that cannot be learnt on your own that's why teacher is there right so the way we teach machines in supervised learning is like this so we provide them with a particular set of inputs and we give the corresponding answers as well for example if I am if I say that what are the parameters for deciding whether it will rain today or not so the humidity should be above some certain level temperature should be above some certain level the brain should be in a certain direction and then if these scenarios are there it will rain right so we give a lot of inputs to the computer with this data and with each data we assign one it rains and zero it does not rain so if the temperature is high and the humidity is high and the wind is in a particular direction it will rain so we say 1 and if the humidity is low and the temperature is low as well so we say it will not rain so I will give it a certain input that today it's certified degrees Celsius the humidity in 97% the wind is in this direction will it rain today all right so the machine will actually see ok so much up from my past experiences I saw that ok this was the temperature and the humidity was this it rained so it will compare that according to it and it will come up with the probability and hence come up with the solution or an answer whether it will rain or not right so this is what supervised learning is so basically we are providing it with the answer and the inputs as well all right so if you were to discuss it in a more general way so you can take your kids as an example so like I said your kids go to school right so your teacher is explaining concept so you kid using example so you tell them so you're trying to make them understand something you're giving them examples as in this is the way it happens right and that's what we do as well in supervised learning we give the machine example so example that day your train and those seen those like this the temperature was the humidity was this and hence a train right so if the inputs are like these you come up with a decision okay it will drain right so this is what supervised learning is the next topic is unsupervised learning so basically if you understood what a supervisor is okay so first guys any doubt and what supervised learning is okay surah says is clear others all right good so our next topic is now unsupervised learning so what is unsupervised learning so you can understand on supervised learning by comparing it straightaway with supervised learning all right so in supervised learning like I said you were giving them answers as well to inputs but an unsupervised learning you don't do that you just give them inputs now you are not giving telling your computer what will be the answer so what computer does is or what is it think logically the only thing computer can do with the inputs is find a pattern behind it or find a structure in it right so this is what the computer actually does so in unsupervised learning what it does is you provided inputs right so for example I want my computer to I give my computer some inputs on fruit all right so I don't tell the computer what the flu pills actually but I give other parameters such as how big it is or what color it has say what is the taste of that fruit all right so when I give all these conditions or all these parameters to my computer so it groups the fruits basis on that so basically it will group it on the basis of size it's a group it be on the basis of taste it will group it be on the basis of color right and then it shows us that data and then we can actually label so okay so the size is big and the color is this you this this fruit will be known as an apple all right now what kind of problems are actually there in unsupervised learning could be when we don't know whether there is a correlation in the letter or whether there is a structure in the data for example if you talk about big data right so big data is nothing but a huge chunk of data right so we don't know that ring that is Adam it's not structured right so whenever we want to find a structure in data we use unsupervised learning now it's the job of the algorithm to figure out what is if there's a pattern in the data and if at all there is a pattern it gives us that fact and hence we can decide how we can move ahead alright so if we have structure or if we have if you know how that data can be differentiated how it can be structured then supervised learning can be applied on it but if we don't know what that data structure is we use unsupervised learning right so guys are we clear with what supervised learning is and what unsupervised learning is okay so if you want to take the same example forward so we talked about your kids in the Pierce example so in the previous example that is supervised learning your kids were learning in school right so your teacher was were telling them examples and we're teaching them how what a particular problem is and how can be tackled but unsupervised learning is when your your kids are learning on their own so they have the books right there trying to figure out what a thing is on their own so that is what unsupervised learning is moving on to the third part which is reinforcement learning so what is reinforcement learning so reinforcement learning basically is when your computer is trying to take decisions all right so what kind of problems can be included in reinforcement learning is say when you're when you wanted to teach you computer how to play chess now you cannot tell your computer what to do because there are a lot of things that are like a zillion possibilities or a zillion moves that can be done in chess so you cannot tell each and every move to your computer but what you can tell is whether he did right or wrong all right and that is what reinforcement learning is for another example that you can take is when you are training your dog all right so you cannot tell your dog what to do because even not understand but you can actually reward your dog if it does right and you can punish them who does wrong right so that same thing is actually applied in reinforcement learning as well so it basically the computers aim is to maximize rewards right when it does the actions so it will come up with the solution which has the maximum rewards in place so we define if it does our sudden action you get a reward and then from its past experiences it understands okay when I did this I got a reward so let me do something similar I will get more rewards right and that is what reinforcement learning is all about so if you were to take the same example forward let's say your kid when you are parenting your kid you tell him you cannot control what a kid does the throughout the day right you cannot tell him each and everything but if he does a bad thing you can actually scold him and tell in that what he did wrong and then you'll understand okay I don't have to do this thing because I get scoldings when I do this thing all right as you can appreciate your kid when he does a good thing right so you'll understand okay I was appreciate it for this so maybe this is the behavior which is expected from me so this is what reinforcement learning is right so guys are we clear with what supervised unsupervised and reinforcement learning is any doubts in any of these three learning techniques which are there in machine learning ok I've got a question from Anita so Anita is asking me can you give me one more example for reinforcement learning ok ok so consider this so you have a temperature control system in your at home right now that temperature control system has to decide whether I should lower the temperature but I should increase it all right so this is an application which actually uses reinforce learning because it has to make a decision now so whenever there is a decision that has to be made you use reinforcement learning now how will it decide whether it will increase the temperature decrease the temperature it will decide based on its past experiences right so it's C what what what what is basically the user or how a user responds to a certain temperature all right and then it will come up with a decision okay so if my temperature is cuddy to right now maybe I need to lower it down maybe I need to lower it down to 30 right so this is just an example there are a lot of parameters that are taking place how many people are there in the room and everything but then this is how the algorithm works when it takes decision based on its past experiences right so if you go by the definition so reinforcement learning was actually inspired by the human behavior or the rat behavior when it is there in the maze right so when I ratted there in maze it has to decide whether it should stop we should go left or right right so that is what this recording has been inspired from any more doubts guys any more doubts and supervised unsupervised and being forcement learning okay so I've got confirmation from the most of you since most of you are clear let's move on to the next topic we now know different ways a machine can learn right now let's discuss how you actually can solve a problem using machine learning all right so now a problem comes up to you now how would you decide or how will you start with that problem so let's shed a light on that so whenever there is a problem that cap problem can be categorized in five ways so those five ways are like this is this a or b is this view how much or how many how is this organized and what should I do next so your problem can would want an answer but which could be is this a or b as in your view you have a problem which is asking say you are differentiating between fruit is this an apple or is this a banana all right so when you have these kind of problems you use classification algorithms the next category is is this view analyze patterns all right so when you have problem wherein you have to analyze plot and where and you have to find in an LOC anomaly or an odd one out you actually go for anomaly detection algorithms all right the next category is how much or how many so then you have to deal with numbers right so when you want some numeric values you want to get a certain value or for example what should be the minimum number of hours that you should put in so that you get promotion all right so when you have these kind of problems so you apply your exertion algorithms on to that then we have how is this organized all right so when you have these kind of questions you use clustering algorithms because basically you are trying to find out what is the structure behind certain data set right so when you are trying to know this structure behind a certain problem you use clustering algorithms and then you have a category which says what should I do next so well a decision has to be made then algorithms for reinforcement learning are used all right so guys any doubts in any of these five categories that we have just discussed so basically what I'm trying to tell you is that each question so any kind problem that you come up with can we categorize under these five categories right it cannot be beyond these five categories it will definitely come up in these five categories and then you can relate to a category and then come up with the algorithm so when you have a set number of outputs you use classification algorithms all right so it works like that so any doubt and whatever we have discussed so far okay that since most of you are now clear alright so let's move on to the next topic so they've discussed so when we have these kind of problems we come up we can solve this using these little columns right so let's learn about these algorithms now that is classification anomaly detection regression clustering and reinforcement so that's it so let's shed a light on that so let's start with algorithms machine learning algorithms so the first algorithm is the classification algorithm so like I said when you have a set number of outputs so basically for questions like this so is it cold outside today so it's the answer will be either yes or no so you have only two outputs the outputs could be either yes but the output could be known all right or the next kind of question to be will you go to work today so it's either a yes no or maybe right so you will either go for work or you'll not go for work or you maybe you say maybe I'll go to work right but there is no other on service can come up right so when you have these kind of conditions you come up with you solve it using classification algorithms now when you have two outputs like for example yes or no it is called two class classification but when you have more than two choices as in in a second question we have yes no or maybe right so this is called multi-class classification so whenever there is an output which is set as in it is either true or false or 0 1 or yes/no whatever right so if it's fixed you use classification algorithms this is basically the gist that you should get out of this any doubts and any doubt and whatever we have discussed ok so let's move on to our second algorithm now which is the anomaly anomaly detection algorithms so in these another you analyze a certain pattern and you you get alerted whenever there's an anomaly or something which is not usual which happens all right for example if as you can see in the figure that you have apart when you have some blue men right and then 7 a red kind of person comes up so this algorithm will actually flag that person because he breaks the pattern he is something which is not expected right and he becomes an anomaly and this is what anomaly detection accordions are all about now what is the use case for anomaly detection algorithms it could be for example in credit card companies so in credit card companies each transaction of yours is monitored right and whenever there is a transaction which is not usual right which doesn't match your daily transaction pattern you get alerted for it so they might confirm with you whether you only made this transaction all right so when you have these kind of problems you use anomaly detection algorithms to solve them the third algorithm is regression algorithms so like I said whenever you have to come up with the value right so you use regression algorithms so for example what will be that be the temperature for tomorrow right so whatever value will come out of this will be a number right so let's say I came up with 28 degree Celsius so I got that temperature using some formulas right and I came up with that noumic value so whenever I am come up with a numeric kind of value of whenever my problem demands that I have to get a mathematical value I go with regression algorithms so the second example for this could be whenever I want to give a discount to my customer now how much discount should I give that customer so that I get more customer and at the same time I do not go and loss as well right I stay in profit so whenever this kind of problem comes up I can go on and use a regression algorithm and solve this kind of problem all right moving ahead we have clustering algorithms so clustering algorithms are basically used so we discussed unsupervised learning remember so an unsupervised learning we have clustering algorithms wherein we try to establish a structure right so we have some unstructured data that you want to make sense of so what we do is we power through a clustering algorithm and if there is a pattern which we are computing and see it comes up with that pattern and shows us like this so for example I feed data to my computer right and my data then applies crashing algorithm onto that so this is the kind of output that I will get so it will categorize it and the Group a group B and Group C and then I can make a decision whether what what I can what I want to do with this data that I've got all right if this computer doesn't understand anything what this data is all about it doesn't understand maybe it's of cause maybe it's of food maybe it's of money right so the computer doesn't understand but what computer understands is numbers right and that is how it relates it to each another and comes up with groups now when it comes up with groups maybe you you want to use some other I will call it amount to it and decide or come up with the solution but this is what a clustering algorithm will give you right having said that let's move on to the next algorithm now which is reinforcement to regard them all right so we discussed reinforcement learning so that is what reinforcement Gorgons are all about whenever you have to make a decision right and so whenever you have to make a decision and your decision is based on the past experiences of your machine or whatever inputs that you have given to your machine you use reinforcement learning now for example whenever you go you wanted to train your computer how to play chess it is usually enforcement learning and when it has learnt or when you have created a model for that and your game is actually being played by the computer each decision that the computer makes is also based or is also taken from reinforcement learning the other example like A to Z was of a temperature control system where in your system had to decide that I should increase the temperature or it should decrease the temperature right so whenever these kind of problems are there right you use reinforcement learning or reinforcement algorithms ok guys so this brings us to the end of machine learning algorithm so we have basically covered the basics which are there we have covered the base software algorithms which I use in machine learning so now if I give you a problem you should be able to identify which algorithm will fit into this problem right what each algorithm is all about how many algorithms are there we discussed that in our later class but for now for today you should understand if I had this problem okay so if I had this kind of problem I should apply this algorithm to it how will I apply this algorithm we'll be discussing that in the later class but this is the idea that you should get today this is step one if you are through with step one it becomes very easy because now just what learning about what each algorithm does but this is the concept behind machine learning this is the concept that should be set in your mind that whenever this kind of problem comes up okay so I have to find a structure behind this problem okay I use flushing algorithms okay so I have solutions to this kind of problem okay you supervised learning and I will be using algorithms in supervised learning for this right so I have a fixed number of outputs for this I'll use classification algorithm for that all right so this is the basic understanding that you should get from this session today all right so enough of theory guys so we are now understood the concept behind machine learning now let's see first of all you guys won't be knowing how the inputs are actually given to a system to create a model right so these inputs are actually called data sets right so now what we'll be doing is we will be seeing how we can prepare a data set to actually create a model and then also verifying that model whether that model is predicting right or wrong right so let's take a sample data set so basically what if we will be doing our machine learning demonstrations in us so I expect you guys to download our studio and the our language in the next class because the next class will also have a lot of demos for today you can just see how we are doing right now and later you will have the code in your LMS you can use that code and execute it and like be ready in the next class because the next class is going to be a lot of demo right but today our time raishin what we're going to do is so this is guys the input that it gets so these these are the values this is a data set which is called empty cuz it's a sample data set in our right so whenever you have to create a model you basically divide your data set because you have to validate that mortar at a later stage as well so you divide your data set between the training part and the testing part so the training part is used to create a model and a testing part will be used to actually verify that model all right now how you can divide the data set is what I'm going to tell you in a few moments but is this clear to you guys why are we dividing the data set we are dividing the dataset because first we will create a model so for creating a model the computer should be fed some values right so when it will be fed some values it can make sense out of it and it will come up with a model now this model can be used to predict values right but how will we verify whether it is predicting correct values or not so for that we have the testing data set so we picking up some values from the testing there is it peering in the values and we see whether it is producing the correct output or not all right I will clear with our problem statement alright guys so let's begin our demonstration then so this is your all console guys what you'll be doing is first you write this command which says data empty cars so what this basically will do is it will import the sample data set called empty cars all right so I've got a variable now which is empty calls so let's let me show you this data set so this is how my data is like so basically these are the car names so there are name of the car and then there are some values associated with that car for example this is the displacement of the car this is the weight of the car and based on the weight and displacement and the horsepower and the other values you have these two values which is whether it has a V kind of engine or whether it has a straight engine all right so if Hat has a V engine it will be a 1 if it has a straight engine it will be a 0 all right so some values might indicate that it can have a V engine as well as a straight engine as well but with today what we are going to do is we are going to predict basically we will be taking in two values will be taking WT that is the weight of the car and we'll be taking D is P that is the displacement of the car and then we will be predicting whether this car will have a V engine or a straight engine so we'll be creating a model in the later part that of today's demonstration but for now we have to divide this data set between the training data set and the testing data set so let's see how will we do that so first of all we have to import a library called CA tools all right so we'll improve that library so it is set all right so now I will write split I will define a variable called split and then I write sample dot split and now I will enter the data set which is empty calls and then I was precipitous Plitt ratio equal to now I want my training data set to be 70% of that data set and my testing gate is said to be 30% all right so I'll specify point seven which specifies 70% right so basically what I am specifying here is that I want to split my data set empty calls in to 70/30 ratio right so let's run this command all right this command is front all right so now I will run this particular variable I will execute this particular task so it has now been executed so what basically has now happened is it has picked out random values right and for each value it has assigned either a 2 or a false right so 70% of the data set has true is true and 30% a data set is false now we will be leveraging that and will be deciding our training and testing data set based on that so training data set is equal to subset of empty cars where split is equal to equal to true all right so basically what I have specified here is my training dataset will be a subset of empty cars where the split is true right so my true is 70% of the data percent right remember so now we'll be executing this so I executed it and similarly for testing I will specify that the split is false right so I'll write falls over here and then I will execute the statement all right so let's check whether we have glittered our data set or not let's check the testing data set so as you can actually see from here that testing has around 12 observations and training has around 20 observations now so the data set has been splitted our empty cars had traded two observations we have splitted in 70/30 ratio so our training gear set has now 20 observations that are 20 rows and a testing data set has 12 observations all right so let me show you my testing data set now so as you can see this is my testing data set this was the whole data set that is this this is the whole of empty cars and this is the data set that has been divided now so my testing data set is 30 percent of this and it has these many values all right so now will be we have splitted our data set now let's now create a model all right so the creation of the model model is same for each and every algorithm just the command changes so let me apply a regression algorithm right now it's called logistic regression right so what royczyk regression does is it comes up with a value right and with that value you decide whether it will be a 1 or a 0 so my logistic regression actually you might ask a question to me that ok so this kind of prop we have to decide it should be either one or a zero so it's a classification probe through guys but behind that classification we are actually calculating probabilities right so we are actually coming up with the number right so whenever you are coming up with the number we use regression algorithms but when you talk about logistic regression logistic regression actually comes under the classified as classification algorithms as well and the regression algorithms as well right so we'll be applying logistic regression and the logistic regression will then give me a probability of as and when I given the values WT that is the weight of the car in the displacement of the car it will give me a probability whether this car will have a vs engine what is the probability of this car having a PS engine right so this is the probability that I get and this is the model that I will be creating right now so let me give clear my console all right so for creating a model you have to type command which is like this so it is type in model all right and for logistic regression the command is GLM and then you will be giving the formula so the formula is we have to predict PS right we have to predict what is the value of years will it be a 1 or a 0 so we will say BS tilt this means vs WT plus D is P right so I want to take into account the weight of the car and the displacement of the car and I want to predict when the weight of the car is WT and the displacement of the car is d is P what will be the value of U this is the formula that I want my model to predict all right now now I'll be specifying bits data set this model has to be applied on so since I have splitted my data set so I want it to be applied on training and then I have to specify the family of the model so basically it's a 1 or a 0 right the values the answer that the vs value is in 1 or 0 right so the family is binomial so this is what you will be specifying right so let's execute this particular statement now we click on run all right so my model has now been created let's so let me show you the summary of the modular all right so as you can see I have came up with the model and it has given me some coefficient values which has been calculated now what are these coefficient values don't worry I Tao I will be explaining this in the next class but for now what you have to understand is what I am trying to make you guys understand is that we are coming up with numbers right so we are not doing any clustering we are not doing any decision making we are coming up with numbers and that is the reason we use a regression algorithm now further as you will see in the next step I will be predicting a value which will be the probability of the car having a VA census all right and then I will teach you how you can actually classify that problem as a 1 or 0 all right so hang on so now what we'll be doing is we have a model right and this is our testing data set so as you can see these are the values that we are going to predict right now so what we'll be doing now is we will actually be feeding the WT and the ISP of this testing data set and mind you guys our model has been created from the testing data set all right so from the training data set so we have not so our model has not encountered the testing data set as of now so these are basically like real values to a model right so now we'll be predicting so let's take an example car air so let's take Fort Pantera and predict whether this car will have a V s engine or a straight engine right so let's feed in the values of that so we'll be creating a data frame first so we'll be feeding our values in the data variable derive rod frame and then with the WT value is so for fault Pantera l the WT value three point one seven zero so let's fit in that point one seven zero and the D is p-value is 351 so let's read in that as well so we have fed the values now let's predict it so we'll be predicting our answer in this variable so the command for predicting is predict model there is a model that you have to predict from the data the data which has the values and type of answer that is response so I want a response now what I'll be getting from this is a probability write the probability of this car having a vyas engine now if the probability is less than 0.5 that means that the probability is that that means that it will not have a reason and the odds of it having a vs engine becomes very less and hence we will consider it as apposed but if it is greater than 0.5 that means the odds of having that of the car having vs engine becomes more right so we will consider that that car will have a vyas engine if its value if its probability value is greater than 0.5 so having said that let's execute the statement and then let's print the answer for Pantera l we predicted that the vyas probability the probability of that car having vs engine is point zero zero seven let's compare whether our 420 Rahel has a vs engine so as you can see there is zero over here that means that four doesn't have a vs engine so if it doesn't have a vs engine it has a straight engine and we have predicted it right our value is correct having said that let's predict one more value for a car which has a vyas kind of engine so let's pick a car from here let's take this car which is Toyota Corona all right so let's feed in values for Toyota Corona so for Toyota Corona our displacement is 120 point 1 let us read that one 20.1 and my weight is two point four six five so let's feed in that as well let's predict the value now so as you can see the probability of Corona having a vias engine is 0.7 seven all right so it has a 77% probability of it having a via signal let's check whether it has a vs engine so yes it has a vs engine and hence our model predicted that right value all right guys so we created a model which can predict values now so you can feed in any displacement and any bait and this model will tell you whether that car should have a V s engine or a straightener right so this brings us to the end of our session guys so before that do you have any doubt in the demo that we did right now any doubts and I will explain it right away all right so Anita has a question she is asking me she understands this is a regression algorithm but why is it a classification algorithm also okay so another as I told you that regression algorithms are basically compute values all right you are calculating probability here but based on this probability you are actually classifying okay let me show you how this will happen just wait a second okay now so let me type in this you so if you type in this command and you specify it that if it's greater than 0.5 specify it as true all right so add this specify greater than 0.5 and then let's check what will be our answer right now so it says true so now you have specified that for this value which is 77% if it's greater than 0.5 as its true so basically you are now classifying that this car that Toyota Corona I will have a BS engine alright now if you were to do that for Ford Pantera L let me do that for you also so basically I just have to change the values so that is 351 for this spaceman - 351 and weight is three point one seven zero all right so let's predict the value again all right so now it says false right so you have classified V s as true or false so true is when it will have a v8 engine and false as well it will not have a PS engine right so you regressed to probability and based on that probability you classified and that is the reason you call this particular column that is logisitics record them as a classification algorithm as well as a regression algorithm as well all right does that make it clear to you later or any more question there is anything that you want to understand all right so Tracy says nice tension thank you okay you're welcome Tracy any more question guys and Alex I'll explain it to you again no worries I like Ashley explained the whole session to you again any doubts okay since most of you are clear let me end this session now let us wrap up this session so thank you for attending this session guys I hope you guys learn something new today this code that they are executed today has been uploaded in your LMS and as well I have uploaded some assignments as well I want you to solve that assignment and come back in the next session with it alright any question if you find any difficulty in and doing anything you have our support team which is available for you 24/7 alright guys so thank you for attending today's session I hope you have a great day ahead goodbye I hope you enjoyed listening to this video please be kind enough to like it and you can comment any of your doubts and queries and we will reply to them at the earliest do look out for more videos in our playlist and subscribe to our at rika-chan to learn more happy learning you
Info
Channel: edureka!
Views: 285,286
Rating: 4.8594565 out of 5
Keywords: yt:cc=on, machine learning algorithms, algorithms in machine learning, machine learning algorithms tutorial, machine learning algorithms explained, machine learning, algorithms, machine learning tutorial, machine learning tutorial for beginners, machine learning with r, what is machine learning, data science tutorial, data science training, machine learning in R, machine learning course, machine learning overview, machine learning edureka, data science edureka, edureka
Id: Up6KLx3m2ww
Channel Id: undefined
Length: 45min 16sec (2716 seconds)
Published: Sun May 21 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.