From 2ede7bd3935fef3bb6cab28c0c891d9a95101ac4 Mon Sep 17 00:00:00 2001 From: Galen Seilis Date: Fri, 14 Jun 2024 13:32:29 -0700 Subject: [PATCH] Update distributions.py --- ciw/dists/distributions.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ciw/dists/distributions.py b/ciw/dists/distributions.py index 889062c..f763e7b 100644 --- a/ciw/dists/distributions.py +++ b/ciw/dists/distributions.py @@ -86,7 +86,7 @@ def sample(self, t=None, ind=None): class Uniform(Distribution): """ - The Uniform distribution. + The continuous uniform distribution over an interval. Takes: - `lower` the lower bound @@ -114,14 +114,22 @@ class Deterministic(Distribution): """ The Deterministic distribution. - Takes: - - `value` the value to return + Notes + ----- + This class samples from a degenerate distribution for a non-negative constant random variable. + This distribution is closely-related to the Dirac δ distribution. """ def __init__(self, value): + """ + Parameters + ---------- + value + The value that is sampled. + """ if value < 0.0: raise ValueError( - "Deterministic distribution must sample positive numbers only." + "Deterministic distribution must sample non-negative numbers only." ) self.value = value