Commit 9ec47bce authored by Tiago Peixoto's avatar Tiago Peixoto

Fix tests in demos/inference/inference.rst

parent 7d66170b
Pipeline #225 failed with stage
......@@ -7,6 +7,9 @@ latex:
test:
sphinx-build -b doctest . build
test-noninteractive:
sphinx-build -b doctest . build *.rst demos/inference/inference.rst
clean:
rm -rf build
......@@ -509,9 +509,9 @@ example, for the American football network above, we have:
.. testoutput:: model-selection
:options: +NORMALIZE_WHITESPACE
Non-degree-corrected DL: 1751.86962605
Degree-corrected DL: 1787.64676873
ln Λ: -35.7771426724
Non-degree-corrected DL: 1749.51938237
Degree-corrected DL: 1780.57671694
ln Λ: -31.0573345685
Hence, with a posterior odds ratio of :math:`\Lambda \sim e^{-36} \sim
10^{-16}` in favor of the non-degree-corrected model, it seems like the
......@@ -575,7 +575,7 @@ random partition into 20 groups
.. testoutput:: model-averaging
Change in description length: -355.3963421220926
Change in description length: -355.396342...
Number of accepted vertex moves: 4561
.. note::
......@@ -599,7 +599,7 @@ random partition into 20 groups
.. testoutput:: model-averaging
Change in description length: 7.3423409719804855
Change in description length: 7.34234097...
Number of accepted vertex moves: 3939
Although the above is sufficient to implement model averaging, there is a
......@@ -1069,7 +1069,7 @@ evidence efficiently, as we show below, using
.. testoutput:: model-evidence
Model evidence for deg_corr = True: -575.864972067 (mean field), -802.39062289 (Bethe)
Model evidence for deg_corr = False: -580.293548926 (mean field), -747.567093161 (Bethe)
Model evidence for deg_corr = False: -584.307313493 (mean field), -707.827204203 (Bethe)
If we consider the more accurate approximation, the outcome shows a
preference for the non-degree-corrected model.
......@@ -1133,8 +1133,8 @@ approach for the same network, using the nested model.
.. testoutput:: model-evidence
Model evidence for deg_corr = True: -358.493559653 (mean field), -649.40897099 (Bethe)
Model evidence for deg_corr = False: -372.104532802 (mean field), -561.973406506 (Bethe)
Model evidence for deg_corr = True: -346.618790006 (mean field), -601.313781849 (Bethe)
Model evidence for deg_corr = False: -374.614350884 (mean field), -563.256840699 (Bethe)
The results are similar: If we consider the most accurate approximation,
the non-degree-corrected model possesses the largest evidence. Note also
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment