class_docstr: Custom ``Sampler`` for bulk-sampling approximate negative items in ``Interactions`` data.
  
  Parameters
  ----------
  interactions: Interactions
  batch_size: int
      Number of samples per batch to load
  shuffle: bool
      Whether to shuffle the order of batches returned or not. This is especially useful for
      training data to ensure the model does not overfit to a specific order of data
  seed: int
      Seed for shuffling if ``shuffle is True``
class_docstr_tok: ["Custom","``","Sampler","``","for","bulk-sampling","approximate","negative","items","in","``","Interactions","``","data",".","Parameters","--","--","--","--","--","interactions",":","Interactions","batch_size",":","int","Number","of","samples","per","batch","to","load","shuffle",":","bool","Whether","to","shuffle","the","order","of","batches","returned","or","not",".","This","is","especially","useful","for","training","data","to","ensure","the","model","does","not","overfit","to","a","specific","order","of","data","seed",":","int","Seed","for","shuffling","if","``","shuffle","is","True","``"]
code: def __init__(
      self,
      interactions: Interactions,
      batch_size: int = 1024,
      shuffle: bool = False,
      seed: Optional[int] = None,
  ):
      self.interactions = interactions
      self.batch_size = batch_size
      self.shuffle = shuffle
      self.seed = seed
  
      self.iteration_order = np.arange(len(self.interactions))
  
      np.random.seed(self.seed)
  
file_path: collie/collie/interactions/samplers.py
imports: import math
  import random
  from typing import List, Optional, Tuple
  import numpy
  import torch
  from collie.interactions.datasets import HDF5Interactions, Interactions
label_desc: Use image node_id 1 to create a new ApproximateNegativeSampler object from inherited base classes: torch.utils.data.sampler with example: obj = ApproximateNegativeSampler(interactions, batch_size, shuffle, seed)