1
00:00:00,050 --> 00:00:03,260
In the previous session, we looked at training optimization.

2
00:00:03,260 --> 00:00:07,430
In this section we shall be diving into performance measurement.

3
00:00:07,430 --> 00:00:15,920
In this section, we shall define a metric which will permit us to evaluate how well the model is performing.

4
00:00:15,920 --> 00:00:21,650
This kind of information is especially important when you have, for example, several models or let's

5
00:00:21,650 --> 00:00:23,450
say you have two models A and B.

6
00:00:23,450 --> 00:00:30,920
So if you have model A, then with A with a given metric, you could evaluate and see how well model

7
00:00:30,920 --> 00:00:32,720
A performs with the metric.

8
00:00:32,720 --> 00:00:38,270
And then uh, for model B you could also evaluate how well it performs with that model.

9
00:00:38,270 --> 00:00:44,180
And then now compare the two models that model A and model B.

10
00:00:44,180 --> 00:00:47,840
In our case we shall be making use of the root mean square error.

11
00:00:47,840 --> 00:00:50,510
And again with TensorFlow is very easy.

12
00:00:50,510 --> 00:00:54,320
You just need to have uh you just need to import the root mean square error.

13
00:00:54,320 --> 00:01:00,800
So you have Keras metrics and then you import um root mean squared error.

14
00:01:00,800 --> 00:01:01,610
So that's fine.

15
00:01:01,610 --> 00:01:09,260
So once you have this imported you get uh to model compilation which is just below here.

16
00:01:09,260 --> 00:01:12,950
And then you include that um, metrics.

17
00:01:12,950 --> 00:01:16,910
And then you have your um metrics.

18
00:01:16,910 --> 00:01:22,430
You have root mean squared error.

19
00:01:22,430 --> 00:01:28,760
So once you include this um, root mean square error in your model compilation and then you, um, restart

20
00:01:28,760 --> 00:01:33,920
the training, you will notice that apart from the loss, you also have the root mean square error.

21
00:01:33,920 --> 00:01:39,140
So now we have the loss and the root mean square error values which have been printed out.

22
00:01:39,140 --> 00:01:42,530
Then you could go ahead and plot the root mean square error out.

23
00:01:42,530 --> 00:01:45,110
So let's copy this and just paste it out.

24
00:01:45,110 --> 00:01:47,060
Here we have a perform loss.

25
00:01:47,060 --> 00:01:53,210
We have the root mean squared and error.

26
00:01:53,240 --> 00:01:54,290
There we go.

27
00:01:54,290 --> 00:02:02,630
Here we have models um model performance um root mean square error.

28
00:02:03,080 --> 00:02:03,980
Close that.

29
00:02:03,980 --> 00:02:05,030
And that's it.

30
00:02:05,030 --> 00:02:10,850
So here we have Rmse E then epoch and train.

31
00:02:10,850 --> 00:02:13,310
So let's run this and then see what we get.

32
00:02:13,310 --> 00:02:16,160
We get we have this error root mean square error.

33
00:02:16,160 --> 00:02:16,790
Let's add this.

34
00:02:16,790 --> 00:02:18,560
Ah run that again.

35
00:02:18,800 --> 00:02:19,940
And that's fine.

36
00:02:19,940 --> 00:02:22,580
So you see the root mean square error tool is dropping.

37
00:02:22,580 --> 00:02:29,420
And then another special method which is used um in TensorFlow to evaluate a model is actually the evaluate

38
00:02:29,420 --> 00:02:29,840
method.

39
00:02:29,840 --> 00:02:34,940
So you do model evaluate and then you pass in X and you pass in y.

40
00:02:34,970 --> 00:02:41,750
So run that again and you see it evaluates the model and gives you the root mean squared error.

41
00:02:41,750 --> 00:02:44,120
So here we have the loss value.

42
00:02:44,120 --> 00:02:46,520
And then you have the root mean squared error.

43
00:02:46,520 --> 00:02:49,730
So this is the loss this is the root mean squared error.

44
00:02:49,730 --> 00:02:52,430
And note that this is uh at the end of the training.

45
00:02:52,430 --> 00:02:55,640
So it tells you how well the model is performing at the end of training.

46
00:02:55,640 --> 00:02:56,780
You could check this out here.

47
00:02:56,780 --> 00:03:00,800
332 869 and 308 096.

48
00:03:00,800 --> 00:03:03,680
That's exactly what we have here.

49
00:03:03,680 --> 00:03:06,590
That's it for this section on performance measurement.

50
00:03:06,590 --> 00:03:10,040
We shall now dive into validation and testing.
