Adding a cache to remember the heaviest child node when predicting.