1
00:00:01,020 --> 00:00:05,470
In this lecture, we will learn how to create gain in modern and Biton.

2
00:00:06,660 --> 00:00:13,520
If you remember in the auditory lectures, we discussed that before running game, then we need to sanitize

3
00:00:13,530 --> 00:00:16,320
our independent variables.

4
00:00:18,020 --> 00:00:24,200
So first, let's see how to standardize our X or independent variables.

5
00:00:26,000 --> 00:00:29,390
We will need pre processing function from what a scalar.

6
00:00:29,750 --> 00:00:33,310
So first we will import pre processing.

7
00:00:34,130 --> 00:00:37,670
And then there is a function known as a standard scalar.

8
00:00:39,030 --> 00:00:46,070
Using a standard scalar will fit our extreme data and create an object called scalar.

9
00:00:46,850 --> 00:00:54,050
This is killer object contains all the information needed to transform our X variable.

10
00:00:57,270 --> 00:01:04,860
To scale our extreme variable, we will use this is skill set that we created on our external data and

11
00:01:04,860 --> 00:01:08,220
we will transform our extreme data using this scalar.

12
00:01:08,880 --> 00:01:15,420
So what is scalar here is the object which contain all the information of standardizing this external

13
00:01:15,420 --> 00:01:15,780
data.

14
00:01:16,380 --> 00:01:21,000
And then we are transforming our external data using this scalar.

15
00:01:24,450 --> 00:01:25,380
If I run this.

16
00:01:27,260 --> 00:01:33,950
Similarly will create a separate scaler for our X test data will follow the same step.

17
00:01:33,980 --> 00:01:41,860
We will use preprocessing or standard scalar and then will fit X test into this Ascender discolor.

18
00:01:42,600 --> 00:01:44,730
So now this is scalar very.

19
00:01:44,960 --> 00:01:50,240
And then all the information that we need to transform our X as variable.

20
00:01:52,320 --> 00:01:59,810
We will use this skill set and we will use transform function to transform our X test and to X test.

21
00:02:00,040 --> 00:02:01,200
Underscore is scale.

22
00:02:06,220 --> 00:02:11,500
Let's have a look at this X underscored best underscore s.

23
00:02:15,600 --> 00:02:20,580
You can see now all the variables are in the smaller range.

24
00:02:21,360 --> 00:02:24,330
Earlier, some of the variables were in decimal.

25
00:02:24,630 --> 00:02:27,620
Some of them were in hundreds or thousands.

26
00:02:28,200 --> 00:02:32,190
Now, all of them are in the small range of values.

27
00:02:36,900 --> 00:02:42,720
When we standardize any variable, we convert the mean off all the values of that.

28
00:02:42,720 --> 00:02:47,490
We rebate to zero and the sender deviation of that variable to one.

29
00:02:51,570 --> 00:02:53,970
Now we have a standardized over variable.

30
00:02:55,410 --> 00:03:02,860
Now let's string Cain and model on our training dataset for CNN will follow the same step.

31
00:03:03,270 --> 00:03:10,350
We will first import gain then from a Skillern and then we'll create an object.

32
00:03:10,530 --> 00:03:18,930
CnF underscored kanon underscore the one with the function gayed neighbor classifier and and neighbors

33
00:03:19,050 --> 00:03:20,940
as one if you remember.

34
00:03:21,060 --> 00:03:24,750
You can set number of numbers and you can then classifier.

35
00:03:25,440 --> 00:03:27,610
So here the value of KS one.

36
00:03:27,900 --> 00:03:31,380
And we can be noted by and underscore neighbors equal to one.

37
00:03:32,970 --> 00:03:39,680
Now we will use this object to footnote extreme and wide data and this model.

38
00:03:43,380 --> 00:03:44,920
We have for today with more Morten.

39
00:03:47,130 --> 00:03:54,870
If we want to create confusion, metrics of this model, we can just use confusion metrics and give

40
00:03:54,870 --> 00:03:55,770
the widest.

41
00:03:56,900 --> 00:04:05,220
And the predicted values of way and sort of basically writing the variable name.

42
00:04:06,160 --> 00:04:09,080
I am giving the output of dysfunction.

43
00:04:09,260 --> 00:04:15,130
I am first predicting the White House values using the predicate function on X test under SCOTUS.

44
00:04:15,860 --> 00:04:22,400
And then I'm using this another argument via test, which is my original values to clear this confusion

45
00:04:22,400 --> 00:04:23,000
metrics.

46
00:04:27,510 --> 00:04:29,670
If you see this are the core values.

47
00:04:31,580 --> 00:04:32,780
Thirty and twenty five.

48
00:04:33,410 --> 00:04:38,960
And this other wrongly classified value, 99 granted, so we can find the accuracy.

49
00:04:38,970 --> 00:04:39,250
Yes.

50
00:04:39,290 --> 00:04:43,750
Fifty five divided by a hundred and two, which is the total number of observations.

51
00:04:44,960 --> 00:04:48,890
Or we can radically calculated using the accuracy scale.

52
00:04:58,060 --> 00:05:04,780
The accuracy photos were gaining more than with one name, but is zero point five three.

53
00:05:07,370 --> 00:05:11,430
Now we can change this number of neighbors from one to any other integer.

54
00:05:13,220 --> 00:05:19,480
Let's run this model for K equals three will follow the same step will first create an object.

55
00:05:19,490 --> 00:05:21,910
C11 that Scott kanon underscore Scott three.

56
00:05:22,190 --> 00:05:31,970
But here, what hyper parameter which is key is three then will fit our Ekstrand or Tanvi trend data.

57
00:05:32,180 --> 00:05:33,860
And to this new object.

58
00:05:35,150 --> 00:05:43,640
And then will Derrick Lee find the accuracy scored from a world wide test and the predicted value of

59
00:05:43,640 --> 00:05:45,350
by test using this model.

60
00:05:46,760 --> 00:05:49,130
Let's run this to find out the accuracy.
