You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The samples object does not include (or at least the histogram plot does not) the variable name of the random variable
Example to reproduce
Provide a code example to reproduce the bug
fromcuqi.distributionimportBeta, Gamma# Define the shape parameters of the Beta distributiona1, a2=3, 2# Step 1: Directly define a Beta distributionz_ref=RandomVariable(Beta(a1, a2))
# Step 2: Construct the Beta distribution using Gamma random variablesx=RandomVariable(Gamma(a1, 1)) # X ~ Gamma(a1, 1)y=RandomVariable(Gamma(a2, 1)) # Y ~ Gamma(a2, 1)z=x/ (x+y) # Z ~ Beta(a1, a2)# Step 3: Sample from both distributionsz_samples=z.sample(10000) # Samples from constructed Beta distributionz_ref_samples=z_ref.sample(10000) # Samples from direct Beta distribution# Step 4: Plot histograms of the samples for comparisonz_samples.hist_chain([0], bins=100)
z_ref_samples.hist_chain([0], bins=100)
The text was updated successfully, but these errors were encountered:
Description
The samples object does not include (or at least the histogram plot does not) the variable name of the random variable
Example to reproduce
Provide a code example to reproduce the bug
The text was updated successfully, but these errors were encountered: