WHY DO WE NEED IT?
Shivam Shrivastava | Data Science
Let’s say we are building a model to predict
the heights
of dogs based on their weights...
DATA
Shivam Shrivastava | Data Science
The general trend is that,
dogs with higher weight
tend to have more height.
Let’s try to fit a model to
make predictions!
Out of the entire
population, we will be able
to sample some training
samples in real life.
SIMPLE MODELS
Shivam Shrivastava | Data Science
We have built a simple
straight line model in the
first case. Here, if you
see, the model is not
able to capture the
patterns of the data. In
machine learning
terminology, this is the
case where
‘bias is high’
SIMPLE MODELS
Shivam Shrivastava | Data Science
One good thing about simple models
is that they do not fluctuate with the
different training datasets.
These models would not be much
different than one another because
they are not influenced by noise in
the data. This is called as having
‘low variance’!
COMPLEX MODELS
Shivam Shrivastava | Data Science
Now, let’s say we built a
very complex model. You
can see in this case that
this complex model is
able to capture the
patterns of our data
really well! This
condition is called as
‘Low Bias’!
COMPLEX MODELS
Shivam Shrivastava | Data Science
But one thing bad about the complex
models is that they fluctuate a lot
with different training datasets!
As you can see, model 1 is so
different than model 2. A complex
model learns too much from the
noise of the data which is not
important. This is called as
‘High Variance’!
EUREKA!
Shivam Shrivastava | Data Science
So, in real life, we need to maintain a
balance between the bias and the
variance to get the best results! And this
is called as the Bias-Variance Tradeoff!
Awesome!