class_docstr: Stochastic Prioritization
  
  https://arxiv.org/pdf/1511.05952.pdf Section 3.3
  proportional prioritization
  
  Args:
      capacity (int): capacity in terms of number of transitions
      alpha (float): Exponent of errors to compute probabilities to sample
      beta0 (float): Initial value of beta
      betasteps (int): Steps to anneal beta to 1
      eps (float): To revisit a step after its error becomes near zero
      normalize_by_max (bool): Method to normalize weights. ``'batch'`` or
          ``True`` (default): divide by the maximum weight in the sampled
          batch. ``'memory'``: divide by the maximum weight in the memory.
          ``False``: do not normalize
class_docstr_tok: ["Stochastic","Prioritization","https",":","\/\/arxiv.org\/pdf\/1511.05952.pdf","Section","3.3","proportional","prioritization","Args",":","capacity","(","int",")",":","capacity","in","terms","of","number","of","transitions","alpha","(","float",")",":","Exponent","of","errors","to","compute","probabilities","to","sample","beta0","(","float",")",":","Initial","value","of","beta","betasteps","(","int",")",":","Steps","to","anneal","beta","to","1","eps","(","float",")",":","To","revisit","a","step","after","its","error","becomes","near","zero","normalize_by_max","(","bool",")",":","Method","to","normalize","weights",".","``","'batch","'","``","or","``","True","``","(","default",")",":","divide","by","the","maximum","weight","in","the","sampled","batch",".","``","'memory","'","``",":","divide","by","the","maximum","weight","in","the","memory",".","``","False","``",":","do","not","normalize"]
code: def __init__(
      self,
      capacity=None,
      alpha=0.6,
      beta0=0.4,
      betasteps=2e5,
      eps=0.01,
      normalize_by_max=True,
      error_min=0,
      error_max=1,
      num_steps=1,
  ):
      self.capacity = capacity
      assert num_steps > 0
      self.num_steps = num_steps
      self.memory = PrioritizedBuffer(capacity=capacity)
      self.last_n_transitions = collections.defaultdict(
          lambda: collections.deque([], maxlen=num_steps)
      )
      PriorityWeightError.__init__(
          self,
          alpha,
          beta0,
          betasteps,
          eps,
          normalize_by_max,
          error_min=error_min,
          error_max=error_max,
      )
  
file_path: pfrl/pfrl/replay_buffers/prioritized.py
imports: import collections
  import numpy
  from pfrl.collections.prioritized import PrioritizedBuffer
  from pfrl.replay_buffers.replay_buffer import ReplayBuffer
label_desc: Use image node_id 1 to create a new PrioritizedReplayBuffer object from inherited base classes: ReplayBuffer, PriorityWeightError with example: obj = PrioritizedReplayBuffer(capacity, alpha, beta0, betasteps, eps, normalize_by_max, error_min, error_max, num_steps)