Updated the algorithm generating predictions for test

Now it actually does it.