Configuration for pyAgrum
Configuration for pyAgrum is centralized in an object pyagrum.config, which is the configuration singleton of the aGrUM C++ library (class gum::Configuration) and holds all the logic. The defaults (those of aGrUM, followed by those of pyAgrum) are embedded in the library; the file pyagrum.ini of the current directory then changes the value of some keys, but cannot create a section or a key.
Each key is declared in the defaults with a metadata line ### type :: documentation where the type is int, float, bool, str, an enumeration of the allowed values (svg|png) or a deprecation (deprecated -> section.key). The setter refuses any value that does not respect the declared type and canonicalizes boolean values (any accepted spelling such as yes/on/1 is stored as True or False) as well as enumerated values (stored with their declared casing). config.typed[section, key] gives the value converted according to the declared type, and accessing a deprecated key emits a DeprecationWarning while transparently using its replacement.
See also the tutorial gum.config :the configuration object for pyAgrum.
Configuration reference
Section [core]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default maximum number of threads used by aGrUM |
|
|
|
default indentation when exporting a model to JGum (-1 = compact) |
|
|
|
allow to fix syntax errors in a model instead of raising when exporting to external format (BIF, etc.) |
Section [notebook]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
number of visible digits when displaying a tensor |
|
|
|
use a background color gradient for the values in a tensor |
|
|
|
color for the minimal value of a tensor |
|
|
|
color for the maximal value of a tensor |
|
|
|
display the values of a tensor as fractions when possible |
|
|
|
maximal denominator for the fraction representation in a tensor |
|
|
|
maximal rounding error when looking for a fraction representation |
|
|
|
use LaTeX to render the fractions in a tensor |
|
|
|
number of visible digits in horizontal histograms |
|
|
|
number of visible digits in vertical histograms |
|
|
|
maximal domain size for a horizontal histogram (vertical above) |
|
|
|
domain size above which a histogram becomes a line plot |
|
|
|
color of the histogram bars |
|
|
|
color of the edges of the histogram bars |
|
|
|
display probabilities as percentages in histograms |
|
|
|
visualisation of the histogram for a discretized variable |
|
|
|
scale for the histogram of a discretized variable |
|
|
|
horizontal margin (in points) when exporting to pdf |
|
|
|
vertical margin (in points) when exporting to pdf |
|
|
|
mode for displaying histograms |
|
|
|
probabilities below this threshold are truncated in histograms |
|
|
|
how to display the parent values in a tensor |
|
|
|
face color of the matplotlib figures (see matplotlib) |
|
|
|
background color of an item in a flow |
|
|
|
border color of an item in a flow |
|
|
|
border width (in pixels) of an item in a flow |
|
|
|
format used to render graphs in a notebook |
|
|
|
display the inference time below an inference graph |
|
|
|
default color of the arcs |
|
|
|
default background color of the nodes |
|
|
|
default font color of the nodes |
|
|
|
background color of a node with evidence |
|
|
|
font color of a node with evidence |
|
|
|
matplotlib color map for the nodes |
|
|
|
matplotlib color map for the arcs |
|
|
|
matplotlib color map for the edges |
|
|
|
default size (in inches) of a graph (graphviz size, e.g. “5” or “12!” for exact size) |
|
|
|
default size (in inches) of a graph during inference (graphviz size, e.g. “8” or “12!”) |
|
|
|
direction of the graph layout (top-bottom or left-right) |
|
|
|
graphviz layout engine |
|
|
|
default view for a Markov random field |
|
|
|
size (in inches) of a junction tree (graphviz size, e.g. “10” or “12!”) |
|
|
|
show the variable names in the cliques of a junction tree |
|
|
|
background color of the separators of a junction tree |
|
|
|
font color of the separators of a junction tree |
|
|
|
font size of the separators of a junction tree |
|
|
|
background color of the cliques of a junction tree |
|
|
|
font color of the cliques of a junction tree |
|
|
|
font size of the cliques of a junction tree |
|
|
|
scale of the cliques in a junction tree map |
|
|
|
scale of the separators in a junction tree map |
|
|
|
length of the edges in a junction tree map |
|
|
|
size (in inches) of a junction tree map (graphviz size, e.g. “10” or “12!”) |
|
|
|
style of an arc missing in the compared graph |
|
|
|
color of an arc missing in the compared graph |
|
|
|
style of an arc absent from the reference graph |
|
|
|
color of an arc absent from the reference graph |
|
|
|
style of an arc reversed in the compared graph |
|
|
|
color of an arc reversed in the compared graph |
|
|
|
style of an arc identical in both graphs |
|
|
|
color of an arc identical in both graphs |
Section [factorgraph]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default background color of the variable nodes |
|
|
|
default font color of the variable nodes |
|
|
|
default background color of the factor nodes |
|
|
|
length of the edges in a factor graph |
|
|
|
length of the edges in a factor graph during inference |
|
|
|
graphviz layout engine |
Section [dynamicBN]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default size (in inches) of a dynamic BN (graphviz size, e.g. “6” or “12!”) |
Section [influenceDiagram]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default size (in inches) of an influence diagram (graphviz size, e.g. “6” or “12!”) |
|
|
|
default background color of the chance nodes |
|
|
|
default font color of the chance nodes |
|
|
|
default background color of the utility nodes |
|
|
|
default font color of the utility nodes |
|
|
|
default background color of the decision nodes |
|
|
|
default font color of the decision nodes |
|
|
|
graphviz shape of the chance nodes |
|
|
|
graphviz shape of the utility nodes |
|
|
|
graphviz shape of the decision nodes |
|
|
|
graphviz style of the arcs pointing to a decision node |
|
|
|
graphviz style of the arcs pointing to a utility node |
|
|
|
default size (in inches) of an influence diagram (graphviz size, e.g. “6” or “12!”) |
|
|
|
default size (in inches) of an influence diagram during inference (graphviz size, e.g. “6” or “12!”) |
|
|
|
number of visible digits when displaying a utility |
|
|
|
show the standard deviation together with a utility |
|
|
|
show the loss (negative utility) instead of the utility |
Section [credalnet]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default background color of the nodes |
|
|
|
default font color of the nodes |
|
|
|
color for the maximal value in a credal set histogram |
Section [causal]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
show the names of the latent variables |
|
|
|
LaTeX command inserted before an intervention (do) in a formula |
|
|
|
LaTeX command inserted after an intervention (do) in a formula |
|
|
|
default size (in inches) of a causal model (graphviz size, e.g. “2.5” or “12!”) |
|
|
|
default background color of the nodes |
|
|
|
default font color of the nodes |
|
|
|
default background color of the latent nodes |
|
|
|
default font color of the latent nodes |
Section [ROC]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
color of the ROC/PR curve |
|
|
|
color of the area under the ROC/PR curve |
Section [ctbn]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
show the names of the latent variables |
|
|
|
default size (in inches) of a CTBN (graphviz size, e.g. “2.5” or “12!”) |
|
|
|
default background color of the nodes |
|
|
|
default font color of the nodes |
|
|
|
default background color of the latent nodes |
|
|
|
default font color of the latent nodes |
Section [bnmixture]
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
default size (in inches) of a BN mixture (graphviz size, e.g. “5” or “12!”) |
|
|
|
default width of the arcs |
|
|
|
default size of the arrow heads |
|
|
|
graphviz type of the arrow heads |
|
|
|
matplotlib color map for the arcs |
|
|
|
default color of the arcs |
|
|
|
graphviz style of the arcs |
|
|
|
default background color of the nodes |
|
|
|
default font color of the nodes |
|
|
|
graphviz layout engine |
|
|
|
overlap scaling for the graphviz layout |
|
|
|
size of the caps on the error bars |
|
|
|
height of the bars in the bar plots |
|
|
|
scale for the bootstrap histograms |
|
|
|
scale for the histograms |
|
|
|
graphviz style of an arc present in the reference BN |
|
|
|
color of an arc present in the reference BN |
|
|
|
graphviz style of an arc absent from the reference BN |
|
|
|
color of an arc absent from the reference BN |
|
|
|
lower quantile used when displaying the distribution of parameters |
|
|
|
upper quantile used when displaying the distribution of parameters |
Deprecated keys
(none)