class_docstr: Half-Student's t distribution.
  
  The half-Student's t distribution has three parameters: degree of freedom
  `df`, location `loc`, and scale `scale`. It represents the right half of the
  two symmetric halves in a [Student's t
  distribution](https://en.wikipedia.org/wiki/Student%27s_t-distribution).
  
  #### Mathematical Details
  The probability density function (pdf) for the half-Student's t distribution
  is given by
  
  ```none
  pdf(x; df, loc, scale) = (1 + y**2 / df)**(-0.5 (df + 1)) / Z,
  where
  y = (x - loc) / scale
  Z = 2 * scale * sqrt(df * pi) * gamma(0.5 * df) / gamma(0.5 * (df + 1))
  
  ```
  
  where:
  * `df` is a positive scalar in `R`,
  * `loc` is a scalar in `R`,
  * `scale` is a positive scalar in `R`,
  * `Z` is the normalization constant, and
  * `Gamma` is the [gamma function](
    https://en.wikipedia.org/wiki/Gamma_function).
  
  The support of the distribution is given by the interval `[loc, infinity)`.
  
  Samples of this distribution are reparameterized (pathwise differentiable).
  The derivatives are computed using the approach described in the paper
  
  [Michael Figurnov, Shakir Mohamed, Andriy Mnih.
  Implicit Reparameterization Gradients, 2018](https://arxiv.org/abs/1805.08498)
  
  
  #### Examples
  ```python
  import tensorflow_probability as tfp
  tfd = tfp.distributions
  
  # Define a single scalar Student t distribution.
  single_dist = tfd.HalfStudentT(df=3, loc=0, scale=1)
  
  # Evaluate the pdf at 1, returning a scalar Tensor.
  single_dist.prob(1.)
  
  # Define a batch of two scalar valued half Student t's.
  # The first has degrees of freedom 2, mean 1, and scale 11.
  # The second 3, 2 and 22.
  multi_dist = tfd.HalfStudentT(df=[2, 3], loc=[1, 2], scale=[11, 22])
  
  # Evaluate the pdf of the first distribution at 1.5, and the second on 2.5,
  # returning a length two tensor.
  multi_dist.prob([1.5, 2.5])
  
  # Get 3 samples, returning a 3 x 2 tensor.
  multi_dist.sample(3)
  ```
  
  Arguments are broadcast when possible.
  
  ```python
  # Define a batch of two half Student's t distributions.
  # Both have df 2 and mean 1, but different scales.
  dist = tfd.HalfStudentT(df=2, loc=1, scale=[11, 22.])
  
  # Evaluate the pdf of both distributions on the same point, 3.0,
  # returning a length 2 tensor.
  dist.prob(3.0)
  ```
  
  Compute the gradients of samples w.r.t. the parameters via implicit
  reparameterization through the gamma:
  
  ```python
  df = tf.constant(2.0)
  loc = tf.constant(2.0)
  scale = tf.constant(11.0)
  dist = tfd.HalfStudentT(df=df, loc=loc, scale=scale)
  with tf.GradientTape() as tape:
    tape.watch((df, loc, scale))
    loss = tf.reduce_mean(dist.sample(5))
    # Unbiased stochastic gradients of the loss function
    grads = tape.gradient(loss, (df, loc, scale))
  ```
class_docstr_tok: ["Half-Student","'s","t","distribution",".","The","half-Student","'s","t","distribution","has","three","parameters",":","degree","of","freedom","`","df","`",",","location","`","loc","`",",","and","scale","`","scale","`",".","It","represents","the","right","half","of","the","two","symmetric","halves","in","a","[","Student","'s","t","distribution","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Student","%","27s_t-distribution",")",".","#","#","#","#","Mathematical","Details","The","probability","density","function","(","pdf",")","for","the","half-Student","'s","t","distribution","is","given","by","``","`","none","pdf","(","x",";","df",",","loc",",","scale",")","=","(","1","+","y","*","*","2","\/","df",")","*","*","(","-0.5","(","df","+","1",")",")","\/","Z",",","where","y","=","(","x","-","loc",")","\/","scale","Z","=","2","*","scale","*","sqrt","(","df","*","pi",")","*","gamma","(","0.5","*","df",")","\/","gamma","(","0.5","*","(","df","+","1",")",")","``","`","where",":","*","`","df","`","is","a","positive","scalar","in","`","R","`",",","*","`","loc","`","is","a","scalar","in","`","R","`",",","*","`","scale","`","is","a","positive","scalar","in","`","R","`",",","*","`","Z","`","is","the","normalization","constant",",","and","*","`","Gamma","`","is","the","[","gamma","function","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Gamma_function",")",".","The","support","of","the","distribution","is","given","by","the","interval","`","[","loc",",","infinity",")","`",".","Samples","of","this","distribution","are","reparameterized","(","pathwise","differentiable",")",".","The","derivatives","are","computed","using","the","approach","described","in","the","paper","[","Michael","Figurnov",",","Shakir","Mohamed",",","Andriy","Mnih",".","Implicit","Reparameterization","Gradients",",","2018","]","(","https",":","\/\/arxiv.org\/abs\/1805.08498",")","#","#","#","#","Examples","``","`","python","import","tensorflow_probability","as","tfp","tfd","=","tfp.distributions","#","Define","a","single","scalar","Student","t","distribution",".","single_dist","=","tfd.HalfStudentT","(","df=3",",","loc=0",",","scale=1",")","#","Evaluate","the","pdf","at","1",",","returning","a","scalar","Tensor",".","single_dist.prob","(","1",".",")","#","Define","a","batch","of","two","scalar","valued","half","Student","t","'s",".","#","The","first","has","degrees","of","freedom","2",",","mean","1",",","and","scale","11",".","#","The","second","3",",","2","and","22.","multi_dist","=","tfd.HalfStudentT","(","df=","[","2",",","3","]",",","loc=","[","1",",","2","]",",","scale=","[","11",",","22","]",")","#","Evaluate","the","pdf","of","the","first","distribution","at","1.5",",","and","the","second","on","2.5",",","#","returning","a","length","two","tensor",".","multi_dist.prob","(","[","1.5",",","2.5","]",")","#","Get","3","samples",",","returning","a","3","x","2","tensor",".","multi_dist.sample","(","3",")","``","`","Arguments","are","broadcast","when","possible",".","``","`","python","#","Define","a","batch","of","two","half","Student","'s","t","distributions",".","#","Both","have","df","2","and","mean","1",",","but","different","scales",".","dist","=","tfd.HalfStudentT","(","df=2",",","loc=1",",","scale=","[","11",",","22",".","]",")","#","Evaluate","the","pdf","of","both","distributions","on","the","same","point",",","3.0",",","#","returning","a","length","2","tensor",".","dist.prob","(","3.0",")","``","`","Compute","the","gradients","of","samples","w.r.t",".","the","parameters","via","implicit","reparameterization","through","the","gamma",":","``","`","python","df","=","tf.constant","(","2.0",")","loc","=","tf.constant","(","2.0",")","scale","=","tf.constant","(","11.0",")","dist","=","tfd.HalfStudentT","(","df=df",",","loc=loc",",","scale=scale",")","with","tf.GradientTape","(",")","as","tape",":","tape.watch","(","(","df",",","loc",",","scale",")",")","loss","=","tf.reduce_mean","(","dist.sample","(","5",")",")","#","Unbiased","stochastic","gradients","of","the","loss","function","grads","=","tape.gradient","(","loss",",","(","df",",","loc",",","scale",")",")","``","`"]
code: def _event_shape(self):
      return tf.TensorShape([])
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 7 for calling the HalfStudentT obj's underlying member method code with example usage: obj._event_shape() and returns: tf