Consider the following code snippet:
using ForneyLab
g = FactorGraph()
@RV x ~ Bernoulli(0.7)
My question is: in what data structure is 0.7 stored? I found that Bernoulli
is a struct
by examining the ForneyLab source code. So far, I have not been able to access “0.7” by examining with g
or x
from the command line. I am working in Jupyterlab. For example,
g.variables[:clamp_1]
produces
Variable(:clamp_1, Edges:
Edge belonging to variable clamp_1: ( clamp_1.i[out] )----( bernoulli_1.i[p] ).
)
I am simply trying to better understand the internal structure of this package, which I find quite interesting. Thank you.