﻿1
00:00:00,300 --> 00:00:03,266
So let's go
back to our polynomial regression model.

2
00:00:03,266 --> 00:00:07,800
And here let's select these two columns
we are only interested in.

3
00:00:08,433 --> 00:00:11,433
So to do this we will reset the data set.

4
00:00:12,233 --> 00:00:14,433
So I'm taking my data set here.

5
00:00:14,433 --> 00:00:18,966
And again I'm taking my data
set then brackets and then this bracket.

6
00:00:18,966 --> 00:00:21,700
Here we will input the indexes
of the columns

7
00:00:21,700 --> 00:00:24,766
we want to keep to train our machine
learning model.

8
00:00:25,500 --> 00:00:28,500
So let's see what these indexes are.

9
00:00:28,633 --> 00:00:29,000
Okay.

10
00:00:29,000 --> 00:00:32,700
So we have three columns
indexes and are started one.

11
00:00:33,133 --> 00:00:34,866
So this column has index one.

12
00:00:34,866 --> 00:00:37,866
This column has index two
and this column has next three.

13
00:00:38,033 --> 00:00:40,200
So since we want to keep these last
two columns

14
00:00:40,200 --> 00:00:43,200
then we want to keep the indexes
two and three.

15
00:00:43,333 --> 00:00:44,633
Okay. So let's input that.

16
00:00:45,600 --> 00:00:46,433
to input this we

17
00:00:46,433 --> 00:00:49,900
can simply input two column three.

18
00:00:50,233 --> 00:00:51,533
Let's check it out.

19
00:00:51,533 --> 00:00:54,433
Let's select this line and execute.

20
00:00:54,433 --> 00:00:57,933
And as you can see now our data set
if we look at it

21
00:00:58,200 --> 00:01:01,300
only has these two columns
level and salary.

22
00:01:01,833 --> 00:01:03,000
So as a reminder

23
00:01:03,000 --> 00:01:06,900
level is the independent variable
and salary is the dependent variable.

24
00:01:07,366 --> 00:01:09,000
So we will use the correlations

25
00:01:09,000 --> 00:01:13,033
between the levels and the salaries
to train our nonlinear machine

26
00:01:13,033 --> 00:01:17,100
learning polynomial regression model
to predict some new salaries,

27
00:01:17,366 --> 00:01:21,600
such as the salary associated
to a 6.5 position level.

28
00:01:22,566 --> 00:01:25,900
Okay, so let's go back to the polynomial
regression model.

29
00:01:25,900 --> 00:01:27,566
Our data set is well important.

30
00:01:27,566 --> 00:01:29,100
Now it's well prepared.

31
00:01:29,100 --> 00:01:30,600
We have everything we need.

32
00:01:30,600 --> 00:01:32,666
And now let's move on to the next step.

33
00:01:32,666 --> 00:01:38,033
So the next step is to split the data set
into the training set and the test set.

34
00:01:38,533 --> 00:01:42,533
And actually this time and normally
this time we will not do that.

35
00:01:42,733 --> 00:01:46,500
And the reason is that
we only have ten observations here.

36
00:01:46,500 --> 00:01:49,000
So this is a very small data set.

37
00:01:49,000 --> 00:01:53,133
And by the way I chose this data set
because we're still shaping

38
00:01:53,133 --> 00:01:54,700
our intuition of machine learning.

39
00:01:54,700 --> 00:01:57,666
We're still learning
the basics of machine learning.

40
00:01:57,666 --> 00:02:01,366
And therefore I choose the simple data set
because we have two dimensions here.

41
00:02:01,366 --> 00:02:06,133
So we will be able to plot the form
of the polynomial regression model itself,

42
00:02:06,566 --> 00:02:09,566
as well as the future nonlinear regression
models.

43
00:02:10,133 --> 00:02:12,400
Okay, so let's go back to our model.

44
00:02:12,400 --> 00:02:14,400
And as I just said,

45
00:02:14,400 --> 00:02:17,833
we will need to split the data set
into the training set and the test set.

46
00:02:18,233 --> 00:02:22,500
So what I'm going to do now is I'm going
to put all this section in comments.

47
00:02:22,966 --> 00:02:24,300
So let's do this.

48
00:02:24,300 --> 00:02:27,933
Press command or control
plus shift plus C.

49
00:02:28,400 --> 00:02:31,500
And that puts all your selected lines
in comments.

50
00:02:32,200 --> 00:02:35,300
So no training set
and no test set will be created.

51
00:02:36,033 --> 00:02:36,366
Okay.

52
00:02:36,366 --> 00:02:38,500
And the last step now is feature scaling.

53
00:02:38,500 --> 00:02:42,233
And the good news is that we won't need
feature scaling either.

54
00:02:42,233 --> 00:02:43,533
And the reason is simple.

55
00:02:43,533 --> 00:02:46,933
It's that because a polynomial regression
model is actually

56
00:02:46,933 --> 00:02:50,500
a multiple linear
regression model with polynomial terms.

57
00:02:50,700 --> 00:02:53,066
You know,
instead of having different features

58
00:02:53,066 --> 00:02:55,633
like features,
that represents something very different,

59
00:02:55,633 --> 00:03:00,600
we are taking a first feature which is
actually the position levels from 1 to 10.

60
00:03:01,266 --> 00:03:05,166
And as the other independent variables
that will be in our multiple

61
00:03:05,166 --> 00:03:08,566
in our regression model,
we will take the squares

62
00:03:08,566 --> 00:03:11,900
and other exponents of these levels. Here.

63
00:03:13,200 --> 00:03:13,533
Okay.

64
00:03:13,533 --> 00:03:16,466
So actually that's done.
That was actually very simple.

65
00:03:16,466 --> 00:03:18,433
No need for training set or test set.

66
00:03:18,433 --> 00:03:20,200
No need for feature scaling.

67
00:03:20,200 --> 00:03:23,200
Just some little changes in the data
set here with the indexes.

68
00:03:23,566 --> 00:03:25,066
And we're all fine.

69
00:03:25,066 --> 00:03:28,666
We're ready to build our first nonlinear
regression model.

70
00:03:28,666 --> 00:03:30,700
That is the polynomial regression model.

71
00:03:30,700 --> 00:03:33,700
And that's what we will be doing
in the next tutorial.

72
00:03:33,900 --> 00:03:36,900
So I look forward to creating
this bluffing detector with you.

73
00:03:37,000 --> 00:03:40,000
And until then enjoy machine learning.
