Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for uniform distribution and triangular distribution #58

Merged
merged 5 commits into from
Jan 15, 2024

Conversation

mahausmani
Copy link
Contributor

tests for uniform distribution added.

@Qazalbash Qazalbash self-requested a review January 15, 2024 11:08
Copy link
Owner

@Qazalbash Qazalbash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mahausmani some test cases are incorrect. Resubmit with the correct one.

@@ -12,39 +12,70 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# limitations under the License.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required

assert uniform_cdf.cdf_x(0) <= 1
assert uniform_cdf.cdf_x(0) >= 0
assert uniform_cdf.cdf_x(15) == 1
assert uniform_cdf.cdf_x(-11) == -jnp.inf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong test case

assert uniform_cdf.cdf_x(-11) == 0.0

assert uniform_cdf.cdf_x(5) <= 1
assert uniform_cdf.cdf_x(5) >= 0
assert uniform_cdf.cdf_x(15) == 1
assert uniform_cdf.cdf_x(-1) == -jnp.inf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong test case

assert uniform_cdf.cdf_x(-1) == 0.0

assert uniform_cdf.cdf_x(-5) <= 1
assert uniform_cdf.cdf_x(-5) >= 0
assert uniform_cdf.cdf_x(1) == 1
assert uniform_cdf.cdf_x(-20) == -jnp.inf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong test case

@Qazalbash Qazalbash self-requested a review January 15, 2024 16:36
@Qazalbash Qazalbash merged commit 5613fb5 into Qazalbash:main Jan 15, 2024
2 checks passed
@Qazalbash Qazalbash changed the title Unit tests for uniform distribution Unit tests for uniform distribution and triangular distribution Jan 15, 2024
@Qazalbash Qazalbash linked an issue Jan 15, 2024 that may be closed by this pull request
21 tasks
@mahausmani mahausmani deleted the uniform_tests branch January 16, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests of distributions
2 participants