I have to admit that I don't understand the code above. What is `pred`? The accumulated predictions (`predictions` in my code) or the ones from the current estimator (`p` in my code)?