Welcome back.
In the last lecture, we saw how to combine and cream, there were more than in this lecture.
We will learn how to evaluate performance of automotive and how to predict classes on the new dataset
using over this green modern first to evaluate performance of our more than we have to use the evaluate
method.
So just right, you have more than object me, which in our case is modern.
And then we are calling even to a method and insight evaluate.
We have to give our test datasets.
So we are writing X test for the independent test dataset and then dependent tests.
So let's just run this.
So the output here is first the loss and then the accuracy.
This is accuracy because this is the metrics which we mention when compiling a lot more than a few remember.
By compiling, we mentioned metrics equal to accuracy.
And that's why 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 liquidations or vishy entries on the same dataset.
So with those models, you will get around 70 to 80 percent accuracy.
But here with in, then we are getting it a six percent accuracy.
So once again, to check the accuracy score or just to check the performance of your model.
You have to use it, will you?
It mattered.
Now let's learn how to predict the probabilities and how to predict the classes on what 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 mount
just from this.
So we have sold the first three reports from our test 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.
It's an.
Let's first calculate the probability score assigned to each class.
To do that, we can use don't predict maitake.
So we'll write down our object name more than then dot credit my card.
And as an argument, we are passing over new unseen data.
Which is X and that's what you.
Let's just run this.
You can see one new that contains three records.
That's why we are getting output for three records.
And there are ten values in each of these elements representing the probability values of corresponding
class.
So for the first record.
The maximum probability is four label equate to 10 and the probability value is point nine make.
For the second record, for Libby's one, for the label corresponding to the third object and for the
third record, we have probably equals two hundred for the second object.
We are also using ground equatable just to round off these probabilities, values to do the same.
It's.
No, it's not pretty.
We are ping probabilities, but if we want to directly predict the loss and not the probability scores,
we can use dort predict underscore.
Classes matter.
So Syntex is almost safe.
First, you have to write your model object name and then call the credit crunch for classes matter.
And in fact, you have to mention your new essay.
Just run this.
You can see here we are getting an update of the labels.
So for the first object.
The class level 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 the position as night
to remember the numbering.
It starts from zero.
So this one is zero.
This one is one.
And so on.
And this one is nine.
So for the second record, we are getting the predicted glasses, too.
And you can also see that the probability was maximum for this record, which is zero one two.
So second uptick for the third record.
We are getting the predicted plus as one.
And in the probabilities also, you can see that the maximum probability correspond to position number
one.
Now, again, it's a little bit difficult to interpret results like this.
Nine to one.
So let's just call your description instead of this, numerical labels will do the same thing we did
earlier.
We have already created a list called Last Name.
We are just passing by Red and to that list.
So if you run this in sort of this labels, you will get the description of each record.
So now let's just confirm this by planting the image of our first new dataset.
So the pollution is zero and we are using.
I am sure this.
You can see this photo looks like an ankle boot, and B, also predicted and called boot for the second
record where the pollution is one and see that this is a pullover.
And we also predicted Pulo.
For the third object here, the pollution is to.
You can see that this is a jeans Krosa and we also Groser.
So that's all we predict with a vote more than we can use, evaluate to evaluate performance of model
on asset and to predict future values.
We can either use not predict it or not predict, and school classes better not predict.
That method will give us the probability values assigned to each class for each record.
While that attended, classes will give us details about the most probable class for that group or.
So that's so we create green and perfect using and will be more than now just for a quick somebody.
We started with importing and installing 10 cents.
Then we imported what fashion amnesty does it with 10 categories.
Then really, why did that do to set in to green validation and set?
And before that we also normalize our dataset?
Well, after that, we created architecture for a lot more than this is where you mention the activation
functions, number of neurons you want in your lives.
After that, we compiled a little more than to give lost function optimizer and the metrics we want
to calculate.
And after that routine, there were more than using not fit.
Michael.
And after what mortally strained, we can use the art history method to get all the Lawson accuracy's
we'll use for each epoch.
After that, we can use to elevate method to check accuracy schools on our astute asset, and we can
also predict values for new records using both predict and not very standard classes matter.