Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
9ec47bce
Commit
9ec47bce
authored
Nov 03, 2016
by
Tiago Peixoto
Browse files
Fix tests in demos/inference/inference.rst
parent
7d66170b
Pipeline
#225
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/Makefile
View file @
9ec47bce
...
...
@@ -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
doc/demos/inference/inference.rst
View file @
9ec47bce
...
...
@@ -509,9 +509,9 @@ example, for the American football network above, we have:
.. testoutput:: model-selection
:options: +NORMALIZE_WHITESPACE
Non-degree-corrected DL: 17
51.86962605
Degree-corrected DL: 178
7.64676873
ln Λ: -3
5.7771426724
Non-degree-corrected DL: 17
49.51938237
Degree-corrected DL: 178
0.57671694
ln Λ: -3
1.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.396342
1220926
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.34234097
19804855
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: -58
0.293548926
(mean field), -7
4
7.
567093161
(Bethe)
Model evidence for deg_corr = False: -58
4.307313493
(mean field), -7
0
7.
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: -3
58.493559653
(mean field), -6
49.4089709
9 (Bethe)
Model evidence for deg_corr = False: -37
2.104532802
(mean field), -56
1.973406506
(Bethe)
Model evidence for deg_corr = True: -3
46.618790006
(mean field), -6
01.31378184
9 (Bethe)
Model evidence for deg_corr = False: -37
4.614350884
(mean field), -56
3.256840699
(Bethe)
The results are similar: If we consider the most accurate approximation,
the non-degree-corrected model possesses the largest evidence. Note also
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment