class_docstr: `Reducer` that computes a running R-hat diagnostic statistic.
  
  `PotentialScaleReductionReducer` assumes that all provided chain states
  include samples from multiple independent Markov chains, and that all of
  these chains are to be included in the same calculation.
  `PotentialScaleReductionReducer` also assumes that incoming samples have
  shape `[Ci1, Ci2,...,CiD] + A`. Dimensions `0` through `D - 1` index the
  `Ci1 x ... x CiD` independent chains to be tested for convergence to the
  same target. The remaining dimensions, `A`, represent the event shape and
  hence, can have any shape (even empty, which implies scalar samples). The
  number of independent chain dimensions is defined by the
  `independent_chain_ndims` parameter at initialization.
  
  As with all reducers, PotentialScaleReductionReducer does not hold state
  information; rather, it stores supplied metadata. Intermediate calculations
  are held in a state object, which is returned via `initialize` and `one_step`
  method calls.
  
  `PotentialScaleReductionReducer` is meant to fit into the larger Streaming
  MCMC framework. `RunningPotentialScaleReduction` in `tfp.experimental.stats`
  is better suited for more generic streaming R-hat needs. More precise
  algorithmic details can also be found by referencing
  `RunningPotentialScaleReduction`.
class_docstr_tok: ["`","Reducer","`","that","computes","a","running","R-hat","diagnostic","statistic",".","`","PotentialScaleReductionReducer","`","assumes","that","all","provided","chain","states","include","samples","from","multiple","independent","Markov","chains",",","and","that","all","of","these","chains","are","to","be","included","in","the","same","calculation",".","`","PotentialScaleReductionReducer","`","also","assumes","that","incoming","samples","have","shape","`","[","Ci1",",","Ci2",",","...",",","CiD","]","+","A","`",".","Dimensions","`","0","`","through","`","D","-","1","`","index","the","`","Ci1","x","...","x","CiD","`","independent","chains","to","be","tested","for","convergence","to","the","same","target",".","The","remaining","dimensions",",","`","A","`",",","represent","the","event","shape","and","hence",",","can","have","any","shape","(","even","empty",",","which","implies","scalar","samples",")",".","The","number","of","independent","chain","dimensions","is","defined","by","the","`","independent_chain_ndims","`","parameter","at","initialization",".","As","with","all","reducers",",","PotentialScaleReductionReducer","does","not","hold","state","information",";","rather",",","it","stores","supplied","metadata",".","Intermediate","calculations","are","held","in","a","state","object",",","which","is","returned","via","`","initialize","`","and","`","one_step","`","method","calls",".","`","PotentialScaleReductionReducer","`","is","meant","to","fit","into","the","larger","Streaming","MCMC","framework",".","`","RunningPotentialScaleReduction","`","in","`","tfp.experimental.stats","`","is","better","suited","for","more","generic","streaming","R-hat","needs",".","More","precise","algorithmic","details","can","also","be","found","by","referencing","`","RunningPotentialScaleReduction","`","."]
code: def name(self):
      return self._parameters["name"]
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/potential_scale_reduction_reducer.py
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.mcmc import reducer
  from tensorflow_probability.python.experimental.stats import sample_stats
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 7 for calling the PotentialScaleReductionReducer obj's underlying member method code with example usage: obj.name() and returns: self