class_docstr: Standard Variational Autoencoders (VAE) for Collaborative Filtering implementation.
docstr: Used for splitting dataset in batches.
  
  Args:
      x_train (numpy.ndarray): The click matrix for the train set with float values.
code: def nn_batch_generator(self, x_train):
      """Used for splitting dataset in batches.
  
      Args:
          x_train (numpy.ndarray): The click matrix for the train set with float values.
      """
      # Shuffle the batch
      np.random.seed(self.seed)
      shuffle_index = np.arange(np.shape(x_train)[0])
      np.random.shuffle(shuffle_index)
      x = x_train[shuffle_index, :]
      y = x_train[shuffle_index, :]
  
      # Iterate until making a full epoch
      counter = 0
      while 1:
          index_batch = shuffle_index[
              self.batch_size
              * counter : self.batch_size
              * (counter + 1)
          ]
          # Decompress batch
          x_batch = x[index_batch, :]
          y_batch = y[index_batch, :]
          counter += 1
          yield (np.array(x_batch), np.array(y_batch))
  
          # Stopping rule
          if counter >= self.number_of_batches:
              counter = 0
  
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 5 for calling the StandardVAE obj's underlying member method code with example usage: obj.nn_batch_generator(x_train) without return types