code: def _mb_model(self, beta, mini_batch):
               
  
          Y = np.array(self.data[self.max_lag:])
  
          sample = np.random.choice(len(Y), mini_batch, replace=False)
  
          Y = Y[sample]
          X = self.X[:, sample]
  
          # Transform latent variables
          z = np.array([self.latent_variables.z_list[k].prior.transform(beta[k]) for k in range(beta.shape[0])])
  
          return neural_network_tanh_mb(Y, X, z, self.units, self.layers, self.ar+len(self.X_names)), Y
docs: Creates the structure of the model (model matrices etc) for mini batch model
  
          Parameters
          ----------
          beta : np.ndarray
              Contains untransformed starting values for the latent variables
  
          mini_batch : int
              Mini batch size for the data sampling
  
          Returns
          ----------
          mu : np.ndarray
              Contains the predicted values (location) for the time series
  
          Y : np.ndarray
              Contains the length-adjusted time series (accounting for lags)