class_docstr: Callback function used to calculate the NDCG@k metric of validation set at the end of each epoch.
  Weights of the model with the highest NDCG@k value is saved.
docstr: Initialise the list for validation NDCG@k.
code: def on_train_begin(self, logs={}):
      """Initialise the list for validation NDCG@k."""
      self._data = []
  
imports: import numpy
  import matplotlib.pyplot
  import seaborn
  import tensorflow
  from tensorflow.keras.layers import *
  from tensorflow.keras.models import Model
  from tensorflow.keras.losses import binary_crossentropy
  from tensorflow.keras import backend
  from tensorflow.keras.callbacks import ReduceLROnPlateau, Callback
  from recommenders.evaluation.python_evaluation import ndcg_at_k
label_desc: Use image node_id 2 for calling the Metrics obj's underlying member method code with example usage: obj.on_train_begin(logs) without return types