If your forecasting model look like this.
But in reality, the numbers came out looking more like this.
Well, you might be asking yourself what went wrong.
We're going to look at three common data model forecasting pitfalls to understand what they are, why they happen and how to avoid them.
So first up, number one, that is called underfitting.
Now, this is a scenario in data science where a data model is unable to capture of the relationship between the input and the output
variables accurately and under fitting usually occurs when a model is too simple.
It just cannot establish the dominant trend within the data.
And if a model can't generalize well to new data, then it's not going to do a very good job with prediction tasks.
You'll get bad forecasting models.
Now, an optimal data model.
In this training dataset, it might look something roughly like that.
An underfit model, well, that will look more like.
This.
There's high bias here and low variance.
See how straight that line is.
And that is a good indicator that you have the fitting.
Now, fortunately, on the fitting is usually quite easy to spot.
It shows up even when modeling the training data set. To fix it
we need to better establish the dominant relationship between the input and the output variables at the onset to build a better fitting.
And likely a little bit more complex model.
Now, three ways that you can do that.
One of those is to decrease something called regularization.
Now, this really means that we're going to let the model be a little more free and how it draws its relationships between inputs and outputs.
And there are a number of methods like L1, regularization and lasso regularization, which help to reduce the noise and outliers within a model.
Second thing you could do is to increase
your training data. Stopping training too soon is a common cause of underfitting.
More data can lead to a better fitting model.
And finally, the other thing you might want to consider is called feature selection.
Now this is used in any model where we want to take specific features to determine a given outcome.
And if there are not enough predictive features present, then more features or features of greater importance should be introduced.
That's what feature selection is.
Okay, number two, we've had underfitting.
Number two is overfitting.
The thing with overfitting is it occurs when a statistical model fits exactly, exactly against this training data.
And when this happens, the algorithm can't perform accurately against unseen data, which well rather defeats its purpose.
Here's the rub with overfitting it can be caused by addressing under fitting a little too aggressively.
Now an over fit model.
It might look a bit more like.
This.
It has a low error rate and a very high variance.
This is anything but straight.
Now here the model is just so well-tuned to the training data.
It's mistaking the noise or some of the irrelevant information from the training dataset as the signal.
Now, unlike under fitting, overfitting isn't always so easy to initially detect and to find it.
We need to test.
We can test for model fitness using techniques like K fold cross-validation and that splits training data into equally sized subsets that could fold and that results in an evaluation score for your model.
Now to prevent overfitting, you might want to consider some of the following techniques.
One.
Is data augmentation.
While it is better generally to inject clean, relevant information into your training dataset, sometimes a little bit of noisy data is added to make the model a little bit more stable.
Another method is ensemble methods.
Well, some of the methods made up of a set of classifiers and their predictors that aggregated to identify the most popular result.
Bagging is one such method where multiple models are trained in parallel on different subsets of data. And then option number three...
...something called early stopping can be used and this method seeks to pause training before the model starts learning the noise within that model of training data.
Of course, you do need to be careful not to stop too soon or you'll be dealing with a bad case of underfitting.
Okay. So finally, in addition to underfitting and overfitting, another common problem is number three.
Bad
Data.
Now this is data that is incorrect or relevant or incomplete, and bad training data can lead to higher error rates and biased decision making.
Even when the underlying model is sound.
Data forecasting models are only as effective as the data they're trained on.
Now some tips to avoid bad data.
Firstly, you want to ensure that your data is accurate and complete by performing cross checking.
And by that I mean cross-checking it against other data sources.
Another thing to do is if we think about outliers.
Get rid of them.
So some outliers can really skew results.
They can take an obscure thing and put it into a training dataset and make that situation seem more likely to occur again than it really is likely to.
And then finally, you need to make sure that this data.
Is timely.
Outdated data is bad data.
Now keep these three things in mind and you should be well on your way to developing better fitting models.
If you have any questions, please drop us a line below.
And if you want to see more videos like this in the future, please like and subscribe.
Thanks for watching.