Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

[TEST] Add statistical inference for Truncated Gumbel distribution #1578

Merged
merged 2 commits into from Aug 24, 2021

Conversation

AetherPrior
Copy link
Contributor

@AetherPrior AetherPrior commented Aug 23, 2021

Description

Attempts to fix #1299 using statistical inference

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • statistical inference test for truncated_gumbel

Comments

Brief description of the test

  • The test involves checking for truncation and also checking if the distribution was initially sampled from a gumbel distribution
  • Using the ks-test, it is possible to compare 2 different samples and check if they arise from the same distribution using p-values (statistical inference).
    • if p_value > 0.05 for over 90% of the time the test is performed, we can accept the null hypothesis (i.e. the sample we have generated is indeed from gumbel).

Method

  1. We first attempt to verify that all the samples have values under the threshold
  2. Then, we undo the truncation, with the help of the implementation of trunc_gumbel in src/gluonnlp/op.py and then sample another gumbel distribution

Note

  • Since this attempts to remove truncation from the gumbel distribution, I'm not sure if the approach is "correct". Requesting comments/approval on the same.

cc @dmlc/gluon-nlp-team

@AetherPrior AetherPrior requested a review from a team as a code owner August 23, 2021 15:58
@github-actions
Copy link

@AetherPrior
Copy link
Contributor Author

Tagging @szha and @zheyuye

@github-actions
Copy link

@AetherPrior
Copy link
Contributor Author

Thank you for your approval of my PR. The build checks have passed. I request for the pull request to be merged and #1299 to be closed.

@sxjscience sxjscience merged commit 83780ab into dmlc:master Aug 24, 2021
@AetherPrior AetherPrior deleted the trunc-gumbel-verify branch August 24, 2021 19:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue] Add test cases for Truncated Gumbel
2 participants