Now, let's proceed further.
First, let's create a new variable with the name data and store our data for a minute.
And then let's create a dummy variable, the variable is a numerical variable that represents categorical
data such as gender, race, etc..
Dummy variables are quantitative variables they can take any to quantitative values suggest one and
zero.
One man's presence of that attribute and zero absence of that.
Here we are creating the variable for the column name page schedule.
After creating that dummy variable, we are removing biweekly label from.
Let's run the cell and show you what it is, let's produce values first, let's piece in the bulletin.
Let's created.
Al Sharpton told Anderson.
Let's see this.
Let's see this dummy.
So patient deal was one column, so it converted one column and created four dummy variables, bi weekly
one means.
Presence of bigly and monthly, semi, monthly and weekly zero.
So you're in the second row.
We have weekly one, which meant it was a weekly payment.
Weekly pay, you and all of us are zero.
Now, from this, let's drop by quickly.
So dramatically so the money is equal to the money that drug labels is able to buy quickly and actually
the one person and sell.
Now, let's drop this dual column from the.
Let's.
So as we have removed the Piscatella column, instead of that, let's add this dummy columns in our
dataset.
So that is a call to be read out concat data and Dommy and Access is called to one.
Let's run this in.
Now, let's check the shape of their data from.
So here we have.
So nine thousand nine zero eight rows and 23 columns.
Now let's update our features and labels.
So is this our label, so let's save you U.S. column in response.
So from day to day, the frame we are taking.
You signed the column name and we are storing it in response.
So response contain only our labels.
So now we have to remove.
This is a column from.
So data don't drop, columns is equal, do you find comma in and we also need to remove this in reality
illustrated in the.
Let's run this El Al Sharpton tattoed on D.L..
Now we need to do data transformation, just standard killing, the use of standard scale to transform
our data into same scale, it standardize features by removing the mean and scaling it to unit variance.
So the standard is of a sample, it is calculated with the formula.
Zero is equal to.
X minus you, you by s.
So excuse here our value.
And you is mean of the training's ample.
And this is standard deviation.
So excuse our value minus you is over, I mean, they were based on the division, so this is how we
calculate the value of standards called.
Do this.
That's Randall.
No, let's split our data into training set test.
So to split our data.
They use a skill and library, so from a skill learned to model selection, import, train spirit.
So your ex is our dataset is the response, which is labeled features, is called dataset labels, is
called response and pesticides is equal to zero point two, which means 20 percent testing site and
80 percent training set and random state is equal to zero.
So here we are creating extra next test by train test.
So these are training features and training training levels, which is why train and exercise control
testing features and why test is called.
Heisting libbers.
Let's run renditioned.
So here we have initialised our standards, Caylor and stored it in a sea, underscore X. Now we need
to fit the standard killer.
So Gautrain is going to.
As you underscore X, which is standard scalar.
That would transform extrem, so we are transforming our extrem and expressed with standards killer.
Let's undersell.
Check the shape of training SEC.
So here we have fourteen thousand three twenty six heroes and 21 columns in.