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
9466363f
Commit
9466363f
authored
Nov 01, 2016
by
Tiago Peixoto
Browse files
Fix docstrings
parent
f1ac6991
Pipeline
#221
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/demos/inference/inference.rst
View file @
9466363f
...
...
@@ -676,9 +676,9 @@ will output:
niter: 53 count: 9 breaks: 1 min_S: 702.85027 max_S: 761.09434 S: 735.06773 ΔS: 24.1310 moves: 28
niter: 54 count: 10 breaks: 2 min_S: 702.85027 max_S: 761.09434 S: 738.16756 ΔS: 3.09983 moves: 115
Note that the value of `wait` above was made purposefully low so that
Note that the value of
`
`wait`
`
above was made purposefully low so that
the output would not be overly long. The most appropriate value requires
experimentation, but a typically good value is `wait=1000`.
experimentation, but a typically good value is
`
`wait=1000`
`
.
The function :func:`~graph_tool.inference.mcmc_equilibrate` accepts a
``callback`` argument that takes an optional function to be invoked
...
...
@@ -767,7 +767,7 @@ analogous, but now we make use of
When using :class:`~graph_tool.inference.NestedBlockState` instances
to perform model averaging, they need to be constructed with the
option `sampling=True`.
option
`
`sampling=True`
`
.
Here we perform the sampling of hierarchical partitions using the same
network as above.
...
...
src/graph_tool/inference/blockmodel.py
View file @
9466363f
...
...
@@ -1658,7 +1658,7 @@ class BlockState(object):
... ds, nmoves = state.mcmc_sweep(niter=10)
... pe = state.collect_edge_marginals(pe)
>>> gt.bethe_entropy(g, pe)[0]
6.65429696440
...
-59.2541131
...
"""
if
p
is
None
:
...
...
@@ -1712,7 +1712,7 @@ class BlockState(object):
... ds, nmoves = state.mcmc_sweep(niter=10)
... pv = state.collect_vertex_marginals(pv)
>>> gt.mf_entropy(g, pv)
2
9.84318996
...
2
5.98257
...
>>> gt.graph_draw(g, pos=g.vp["pos"], vertex_shape="pie",
... vertex_pie_fractions=pv, output="polbooks_blocks_soft_B4.pdf")
<...>
...
...
@@ -1778,7 +1778,7 @@ class BlockState(object):
... ds, nmoves = state.mcmc_sweep(niter=10)
... ph = state.collect_partition_histogram(ph)
>>> gt.microstate_entropy(ph)
12
4
.0
9217
6...
12
8
.0
5589
6...
"""
...
...
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