Hi.
So now we will have a look at your depression project solution, so this particular solution I will
be implementing in CoLab because the data set is pretty large and then we are using Google Kulab.
It will help us run this code a little faster and there is a little chance of crashing and all of the
problems that you face.
So we will be using Google Kulab for this.
Now, a few tips for starting with Google collabs.
You will basically have to open your Google Drive and inside the wheel drive itself.
What you can do is let us say we have this Google Drive.
I can simply say more and inside more.
That is option for Google collaboratory.
So when I open collaboratory, it will be showing me a blank sheet.
And when I see this blank sheet, I can start walking on barbarically.
So here I have this blank sheet.
If I do this, there will be more line of cords.
If I do this, there will be more markdowns which will be added.
Then here we have option for connecting, connecting with the colors.
When we click on this, there are two options.
One is Connector Holsted runtime.
On the other one is going to look one thing so you can use local runtime when you are not really working
on something big.
But if you're working on a larger data set or when you want to have faster processing, you can use
those different thing.
And here you have options for monetization.
So when I click on this, it shows me different kind of sessions which are open and then you can decide
if you want to close a session or something like that.
Next thing which we have here is, again, in the done thing.
We have this a change runtime option, which allows me to have these three options.
One is none under the one you wanted of one is to use.
Nine is when you are not using any hardware accelerator.
That is, you don't want to foster anything.
You want to use it just like you use your normal laptop or your computers.
Then you want a little faster processing.
You can use abuse and abuse goes on.
The abuse do not have much difference.
But when you are working on deep learning or when you're working with dancers at that point of time,
the abuse would perform better because they are working on dancers.
And so that is when you can use Depuis otherwise working with your workspace.
So I will be using none for now and I click save and then it will connect for me.
I just click connect and it will connect.
So now going back to our solution
now here we have this code.
So I the first thing that you will be doing is running this particular command which will mount your
whole bedrick.
So basically when I run this, what happens is I did run this for you.
It will ask me for this particular warrant.
So when I click this particular, you are eligible, ask me to select one particular email, idy or
one particular drive from which I want to retrieve the data.
So once I choose my email I.D., it will give me this particular option where I can see a lull and after
I see allow it will give me this particular code, which I can simply copy by clicking on this.
And I will go back and then I go back.
I enter this phase out of here and then I enter this.
It will authorize this and connect with the Google Drive.
So once this will drive this connected, if you click on this Fi's option, you can see the entire drive
structure.
So if I click on this, I be able to see all the different files which are present in my drive and all
those details.
So this is what I will be having.
So what I can do is I can simply go to this particular run by different libraries, which I want to
import.
Then I can provide the CSP details.
So I have to provide the parts for the CSP file.
So let me show you how I got this particular box.
So I just went inside this particular part in the files and I think here and then I'll write click and
I copy both and it will give me the part for this.
That's all you need to do to import any fight.
After that.
I have imported this data set.
So this data set contains different ideas, the hazard details, which is the numeric value, which
isn't in Dederer value, which is a whole number, which is not a floating point number, basically.
Then we have different variables which we have to keep off the book.
Now out of these variables, if I see the shape there, around 40000 rows of data.
Thirty four columns, I will find out the target column as Hassard.
And this idea does not make really sense to me.
It doesn't give much information so I can really get rid of this column.
Next is the ANOVA one we do with the 50.
I will have to take care of these columns and find out which are actually important and which are not.
So I will get the column five.
So if we see the airport select detail and find out the object type, you can see that these all are
categorized as Object B, so I will find out the cutoff value.
So here I am sitting because of value to be five percent.
So whatever value is having five percent, less than five percent frequency of any information internally,
I will simply get rid of those particular categories.
I convert my category categorical columns into dummy variables.
So this is the code which we have been using for ever.
So it's simply the ject me, the categories which have frequency more than the cutoff value, which
is more than five percent in any particular column.
And then I get these different categories and it converts these categorical variables into dummy columns.
So these are the columns which have been generated.
Now next thing which we will be doing is I have just included define this particular report function,
which will give me the report next.
What I do is I create this VYE data frame, which contains my target and state of name, which contains
my features or attributes next time reporting different libraries for my model building like Bensedrine
split randomise.
So it's the only decision created this linear regression, which all is the next thing which I do is
I am simply implementing the ridge regression here.
Ridge regression is giving me all these different runs and later, towards the end of.
I can see this information which has been retrieved, and the best estimate that comes out to be the
one with Elfy is equal to one hundred makes.
What I do is I can find out the mean validation school, which is minus two point seven seven five.
Now, at the beginning of this particular project, we had a guy claim that the scoring will be done
based on a particular formula, which you must have noted down, which is one minus the mean validation
score.
That is the error of divided by a five point four.
So that is what we are looking for.
We are looking for a value greater than five point one there.
So these are the different results, which are not really satisfactory enough for us.
So we will go ahead and we will load the predictions versus the data we want, which is one of the variables
which are present here.
So if you see the believin is scattered like these, I'm the prediction, which we have our prison here.
So you can see immediately it is not able to find those these values which are scattered about.
Similarly, that we will go further and implement the decision created this year and inside this decision
to said again, we are finding out they may not be negative, mean, absolute error, and we have implemented
this entire thing.
And again, this is the main validation score which we obtained out of it.
And these are the predictions.
So now you can see this is already better than the previous one.
The next thing which we do is we are implementing the random for this trip this year.
So as we go further, it does find something relevant here.
So here we are using the land of what is vessel and we are using negative, mean absolute data and again,
it has this particular desert, which it gives us out of it, and they show the desert to.
This is the Red Crescent.
This is the other details, and now here we are implementing the most aggressive with the objective,
as we saw.
Now, this is what will actually help us achieve our target, because earlier what we were doing was
while we were targeting, we were finding out cantinas values.
But when we use conquest, only me give us the values which are not in a floating point of format.
So we'll go further.
And here you can see that the result is minus two point seven to six.
And as we go further, you can see the results have further improved.
Move now.
Next, we will go on doing the barometer here.
If you would have noticed one thing they are doing the sequentially cleaning, which is we asked for
in the first run, the fix the estimate when the object, all of the barometers are commented here,
very ladies are dad.
It will consider these values to be the default values for the body which are already present.
So when we wrap this, we are trying to find out the estimated value when hit on this.
Here I find out the estimated value 500 folks built for me.
So I go ahead.
And in the next one I put in estimate Demetri's 250 and further, I try to find out different learning
rates for myself now, different learning rate.
So I have provided all these learning rates and I'm running this training, this model again.
When I put this model and I see the results, it allows me to find out of more better values.
And I'm able to find out that learning rate, which is doing well for me, is zero point zero zero five.
So I will fix this again.
Now, I fixed my loan exactly zero point zero zero five and the next best one, that's zero point zero
zero two to there.
Also, I have all fixed.
Now, what I will do is I am training this to find out the best muxtape.
So now again, I will fit the mold of the model here.
We get to know that this is the desired for us.
So we go further and you can see that the learning tool is performing well in maximum depth.
Seven performance.
So we go ahead.
We put the maximum that the seven learning theta zero point zero zero two and estimated about 500.
These are the values which we have fixed and subsample is the values which we are trying to find out
now.
Again, we will do the same thing and I predict we will improve our model and fix the parameters.
Now, doing this is useful only if your model performance also improves.
So if my modeling performance is not improving, so this value is minus two point sixty six.
If I go for the standard deviation of zero point three four nine five, if I go above here, we have
minus two point six to seven.
So here you can see there is a slight improvement.
But I will keep on going only if this there is a good number, good amount of improvement.
It is improving by zero point one percent.
So that is not much improvement.
Right.
So we are not looking for that small amount of improvement.
We are looking for a large and improvement.
So anybody from this would be fine for us.
Now, what you can do is you can create different models.
So this is just one of the examples I used.
You can start different models and you use count for something that I don't see how you can improve
that you can create a combination of different models and try implementing those.