‫Welcome back.
‫In the last lecture we saw how to combine and train a lot more than in this lecture.
‫We will learn how to evaluate performance of automotive and how to predict classes on the new dataset
‫using our this more than first to evaluate performance of our more than we have to use the Evaluate
‫method.
‫So just right you have more than object name which in our case is modern.
‫And then we are pulling evaluate my take and inside evaluate.
‫We have to give our test data sets.
‫So we are writing x test for the independent test data side and then dependent test.
‫So large this run this
‫so the output here is first the loss and then the accuracy.
‫This is accuracy because this is the metrics which we mentioned while compiling a lot more than a few
‫remember.
‫By combining we mentioned metrics equal to accuracy and that's what the second value which we are getting
‫here is of accuracy.
‫So on our test set the accuracy which we are getting is 86 percent which is really good as compared
‫to logistic regulations or entries on the same data side.
‫So with those models you will get around 70 to 80 percent accuracy.
‫But here with it and then we are getting 86 percent accuracy.
‫So once again to check the accuracy score or just to check the performance of your model you have to
‫use evaluate metric.
‫Now let's learn how to predict the probabilities and how to predict the classes on our new unseen data.
‫Since right now we do not have any new data.
‫We just taking first three samples from our test dataset and consider that as your new unseen data.
‫Just from this.
‫So we have saw the first three reports from our dataset and we are considering it as our new record.
‫So there are two parameters which you can predict.
‫First one is the probability of each class and second one is the class.
‫Let's first calculate the probability score assigned to each class to do that.
‫We can use not predict metric.
‫So we will write the object name more than then not predict my.
‫And as an argument we are passing over new unseen data which is X and that's what you notice on this.
‫You can see our new data contains three records.
‫That's why we are getting output for three records and there are 10 values in each of these elements
‫representing the probability values of corresponding class.
‫So for the first record the maximum probability is for a label equal to 10 and the probability value
‫is point nine.
‫For the second record.
‫Probability is 1 for the label corresponding to the third object.
‫And for the third record we have called equal 200 for the second object.
‫We are also using round equal total just to round off.
‫This probably gives values to do that similar religions.
‫No it's not pretty.
‫We are projecting probabilities but if we want to radically predict the class and not the probability
‫scores we can use that predict underscore.
‫Classes matter so so indexes almost same.
‫First you have to write your model object name and then call the product standards for classes matter
‫and in fact you have to mention your new asset.
‫Just run this
‫you can see here we are getting an array of the labels.
‫So for the first object the class label is nine so you can also confirm it from here also the maximum
‫probability was assigned to this object and here also we are getting a position as 9 to remember the
‫numbering.
‫It starts from zero.
‫So this fund is zero.
‫This fund is 1 and so on.
‫And this fund is 9 so for the second record we are getting the predicted glasses.
‫And you can also see that the probability was maximum for this record which is 0 1.
‫So second object for the third record we are getting the predicted class says 1 and in the probabilities
‫also you can see that the maximum probability correspond to position number 1 now again it's a little
‫bit difficult to interpret desserts like this.
‫Nine to one so large this causes the body description instead of this new medical labels.
‫So we will do the same thing we did earlier.
‫We have already created a list called last name.
‫We are just passing by a red and blue that this if you run this instead of this labels you will get
‫the description of each record.
‫So now Lexus confirm this by plotting the image of our first new dataset.
‫So the position is zero and we are using.
‫I am sure this
‫you can see this photo looks like and then cobalt and be also pretty and callable for the second record
‫where the pollution is one and see that this is a pullover.
‫And we also predicted below for the third object yellow shine this boot
‫you can see that this is a jeans trouser and we also
‫so they're told we predict with a word more than we can use evaluate beryllium performance of the model
‫on set and to predict few values.
‫We can either use not predict might hurt or not predict and school classes might not predict that method
‫will give us the probability values assigned to each class for each record while they attended classes
‫will give us details about the most probable last for that group or
‫so that so we create train and predict using MLB more than now just for a quick somebody
‫we started with importing and installing 10 cents lower then we imported what fashion Amnesty does set
‫with 10 categories
‫then we divided that dataset and to green validation and set.
‫And before that we also normalize our dataset now after that we created architecture for our model.
‫This is where you mentioned the activation functions number of neurons you want in your lives
‫after that we compiled our model to give lost function optimizer and the metrics we want to calculate.
‫And after that we train that one model using not fit method
‫and after one more delay strain we can use the short history method to get all the loss and accuracy
‫values for each epoch after that we can use dot evaluate method to check accuracy scoots on the as dataset
‫and we can also predict values for new records using both predict and plus as matter.