pytorch/test/distributions
Neeraj Pradhan af902102e0 Fix discrete sampler test to correctly run Chi2 test (#73251)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73251

Scipy's chisquare test requires that the observed frequencies should sum up to the same number as the expected frequences. This modifies `_check_sampler_discrete` to ensure that two match. See: https://github.com/scipy/scipy/issues/12282 for details.

Test Plan: Unit tests pass on platform010

Reviewed By: r-barnes

Differential Revision: D34402314

fbshipit-source-id: 995b4ddf668cfb551176d3bd21fb8415dfe96cc1
(cherry picked from commit d81a133b0d2cdc621d08caf31afd69d716229b97)
2022-02-23 02:31:42 +00:00
..
test_constraints.py [torch.distributions] Implement positive-semidefinite constraint (#71375) 2022-01-20 17:33:08 +00:00
test_distributions.py Fix discrete sampler test to correctly run Chi2 test (#73251) 2022-02-23 02:31:42 +00:00
test_transforms.py Add transformation using cdf of distribution. (#72495) 2022-02-09 14:46:47 +00:00
test_utils.py