We will evaluate the performance of predictions using the root mean squared error (RMSE).
This is because a rolling-forecast type model is required from the problem definition.
This is where one-step forecasts are needed given all available data.
If another villain kills the hero, this one may make sure that the hero doesn't die alone, and the hero will do the same for them. Has nothing at all to do with attacking your teammates, nor with Helpful Mooks.
Even if the villain doesn't switch sides, it's not impossible for both to be friends "off the clock", or take time out of their latest fracas to Go Karting, or share a meal, or run errands together. A villain may notice that this is weakening him against the hero, and he'll promptly jump off the slope that they've been slowly climbing and undoing seasons worth of Villain Decay by doing something truly vile, like stuffing the hero's girlfriend in a fridge, or just plain pulling out new and lethal tactics when the hero is expecting the same old Harmless Villain. See Dating Catwoman for the (explicitly) romantic version. There is also the Friendly Rivalry which is essentially a milder version of this trope where the antagonistic characters are just competing (in some kind of sporting event, for example) rather than trying to thwart each other.
Any transforms to the data must be reversed before the RMSE is calculated and reported to make the performance between different methods directly comparable.
We can calculate the RMSE using the helper function from the scikit-learn library that calculates the mean squared error between a list of expected values (the test set) and the list of predictions.
Time series forecasting is a process, and the only way to get good forecasts is to practice this process.
In this tutorial, you will discover how to forecast the monthly sales of French champagne with Python.
Over the course of a series' many Story Arcs, the two will develop a grudging respect for them as a Worthy Opponent.
Sometimes, the villain will decide to admit to the friendship and perform a full Heel Face Turn.
This project is not exhaustive, but shows how you can get good results quickly by working through a time series forecasting problem systematically.