Step five modeling part two.
Choosing mentioned in the last listen.
There were three parts to modeling.
Choosing a model choosing a model and comparing models.
Once you've got your data split into training validation and test sets you can start to go through each
of these steps.
In this lesson we're going to cover some points on choosing a model which is you choose a model and
train it on your training data.
Unlike creating your own algorithms from scratch there are many pre-built machine learning models which
you can take advantage of when you first begin.
Your main goal will be knowing what kind of machine learning algorithm to use with what kind of problem
this is because some algorithms work better than others on different types of data.
We'll have a look at this specifically when we get hands on with our projects.
But for now a tidbit to remember is if you're working with structured data decision trees such as random
forest and gradient boosting algorithms like cat boost in x g boost tend to work best and if you're
working with unstructured data deep learning neural networks and transfer learning tend to work best.
Once you've chosen a model your next step is to train.
The main goal here will be to line up the inputs and outputs.
For example in our heart disease problem we want our model to look at the feature variables the inputs
and then find the patterns and use them to predict the target variable.
So remember from previous lesson these variables here are the feature variables we want to use these
to predict the target variables.
Another common naming setting is to use x which is the data to predict Y which is the labels different
machine learning algorithms have different ways of doing this.
We'll see how to do it for a handful of useful ones in future projects.
And remember training a model takes place on the training data split.
This is where your model learns the course material.
We don't want to let our models cheat and see the final exam before they do their study.
Depending on how much data you have and how complex your model is training may take a while.
One of your biggest goals when training a model is to minimize the times between experiments.
So sometimes this will mean to use a small portion of your data first.
For example if your training dataset had 100000 examples you might start training a model with only
the first 10000 and see how it goes.
You might also decide to use a less complicated model to begin with deep model such as no networks generally
take longer to train than other kinds of models.
Now this is something worth considering when it comes to training your own models.
For example if an experiment takes you three hours or even up to a couple of days for a small percentage
abuse and performance of your model you might consider is this experiment actually worth it.
Because machine learning is highly iterative.
We want to minimize this experimentation time that we can go from step 1 to step 2 to step 3.
But again if this looks confusing we'll see it in practice in the hands on projects and things to remember.
Some models work better than others and different problems.
Don't be afraid to try things and this is really important.
Machine learning is as we said before a highly iterative process.
So some things that you try out may not work the first time and that means you just neglect that thing
going forward and try something else.
Start small and build up add complexity as you need.
What this means is that for example if you had one hundred thousand examples we're going to start on
ten thousand we're going to use a simple model first to begin with rather than going to the biggest
and latest and greatest model because what we're after is practical results not something that's that's
the best on paper.
We want to see something that can actually be used in the real world.
And part of your experiments will involve tuning a model which shows good initial results to get better
results.
Like tuning a car if your car does well on on one track it might not do well on another track.
So you turn it up.
Let's have a look at how to do that but instead of four cars we'll do it for machine learning models.