Implementing engrams from a machine learning perspective: matching for prediction