-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hey there,
Thanks a lot for writing this wonderful module. While it meets most of my modeling needs, I wonder if you have ever considered enabling the module for one sided truncation? I was thinking that using np.inf might solve the problem. But it does not seem to work as I imagined:
import tensorflow as tf
import numpy as np
from truncatedDistribution import TruncatedDistribution as TD
import matplotlib.pyplot as plt
session = tf.Session()
base_normal = tf.distributions.Gamma(100.,2.)
trunc_normal = TD(base_normal, - np.inf, 10.)
plt.hist(trunc_normal.sample(100).eval(session = session))
Here the output is a vector full of Nan.
Metadata
Metadata
Assignees
Labels
No labels