class_docstr: For proportional prioritization
  
  alpha determines how much prioritization is used.
  
  beta determines how much importance sampling weights are used. beta is
  scheduled by ``beta0`` and ``betasteps``.
  
  Args:
      alpha (float): Exponent of errors to compute probabilities to sample
      beta0 (float): Initial value of beta
      betasteps (float): Steps to anneal beta to 1
      eps (float): To revisit a step after its error becomes near zero
      normalize_by_max (str): 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: ["For","proportional","prioritization","alpha","determines","how","much","prioritization","is","used",".","beta","determines","how","much","importance","sampling","weights","are","used",".","beta","is","scheduled","by","``","beta0","``","and","``","betasteps","``",".","Args",":","alpha","(","float",")",":","Exponent","of","errors","to","compute","probabilities","to","sample","beta0","(","float",")",":","Initial","value","of","beta","betasteps","(","float",")",":","Steps","to","anneal","beta","to","1","eps","(","float",")",":","To","revisit","a","step","after","its","error","becomes","near","zero","normalize_by_max","(","str",")",":","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,
      alpha,
      beta0,
      betasteps,
      eps,
      normalize_by_max,
      error_min,
      error_max,
  ):
      assert 0.0 <= alpha
      assert 0.0 <= beta0 <= 1.0
      self.alpha = alpha
      self.beta = beta0
      if betasteps is None:
          self.beta_add = 0
      else:
          self.beta_add = (1.0 - beta0) / betasteps
      self.eps = eps
      if normalize_by_max is True:
          normalize_by_max = "batch"
      assert normalize_by_max in [False, "batch", "memory"]
      self.normalize_by_max = normalize_by_max
      self.error_min = error_min
      self.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 PriorityWeightError object from inherited base classes: object with example: obj = PriorityWeightError(alpha, beta0, betasteps, eps, normalize_by_max, error_min, error_max)