[docs]classChi2(Gamma):r""" Creates a Chi-squared distribution parameterized by shape parameter :attr:`df`. This is exactly equivalent to ``Gamma(alpha=0.5*df, beta=0.5)`` Example:: >>> # xdoctest: +IGNORE_WANT("non-deterinistic") >>> m = Chi2(torch.tensor([1.0])) >>> m.sample() # Chi2 distributed with shape df=1 tensor([ 0.1046]) Args: df (float or Tensor): shape parameter of the distribution """arg_constraints={"df":constraints.positive}def__init__(self,df,validate_args=None):super().__init__(0.5*df,0.5,validate_args=validate_args)
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.