class_docstr: Adapts the inner kernel's `momentum_distribution` to estimated variance.
  
  This kernel uses an online variance estimate to adjust a diagonal covariance
  matrix for each of the state parts. More specifically, the
  `momentum_distribution` of the innermost kernel is set to a diagonal
  multivariate normal distribution whose variance is the *inverse* of the
  online estimate. The inverse of the covariance of the momentum is often called
  the "mass matrix" in the context of Hamiltonian Monte Carlo.
  
  This preconditioning scheme works well when the covariance is diagonally
  dominant, and may give reasonable results even when the number of draws is
  less than the dimension. In particular, it should generally do a better job
  than no preconditioning, which implicitly uses an identity mass matrix.
  
  Note that this kernel does not implement a calibrated sampler; rather, it is
  intended to be used as one step of an iterative adaptation process. It
  should not be used when drawing actual samples.
class_docstr_tok: ["Adapts","the","inner","kernel","'s","`","momentum_distribution","`","to","estimated","variance",".","This","kernel","uses","an","online","variance","estimate","to","adjust","a","diagonal","covariance","matrix","for","each","of","the","state","parts",".","More","specifically",",","the","`","momentum_distribution","`","of","the","innermost","kernel","is","set","to","a","diagonal","multivariate","normal","distribution","whose","variance","is","the","*","inverse","*","of","the","online","estimate",".","The","inverse","of","the","covariance","of","the","momentum","is","often","called","the","``","mass","matrix","''","in","the","context","of","Hamiltonian","Monte","Carlo",".","This","preconditioning","scheme","works","well","when","the","covariance","is","diagonally","dominant",",","and","may","give","reasonable","results","even","when","the","number","of","draws","is","less","than","the","dimension",".","In","particular",",","it","should","generally","do","a","better","job","than","no","preconditioning",",","which","implicitly","uses","an","identity","mass","matrix",".","Note","that","this","kernel","does","not","implement","a","calibrated","sampler",";","rather",",","it","is","intended","to","be","used","as","one","step","of","an","iterative","adaptation","process",".","It","should","not","be","used","when","drawing","actual","samples","."]
code: def experimental_with_shard_axes(self, shard_axis_names):
      return self.copy(experimental_shard_axis_names=shard_axis_names)
  
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.mcmc import preconditioning_utils
  from tensorflow_probability.python.experimental.stats import sample_stats
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 14 for calling the DiagonalMassMatrixAdaptation obj's underlying member method code with example usage: obj.experimental_with_shard_axes(shard_axis_names) and returns: self