Detecting catastrophic forgetting
In this chapter, we are going to look at two different approaches that you could use to detect catastrophic forgetting. The first approach is to implement a system that can detect problems with a model just after it has learned something. To do this, we are going to implement a Python example in multiple steps:
- Develop a model training loop with online learning.
- Add direct evaluation to this model.
- Add longer-term evaluation to this model.
- Add a system to avoid model updating in case of wrong learning.
Using Python to detect catastrophic forgetting
To work through this example, let's start by implementing an online regression model, just like you have already seen earlier on in this book:
- To do this, we first need to generate some data. The code to generate the data for this example is shown here:
Code Block 11-1
import random X = [ 1, 1, 1, ...