A log-linear model is a list of interaction terms ψA. Its graph joins two variables whenever some term contains both, and a missing edge is a conditional independence (Theorem 19.4). The model is hierarchical if every sub-term of a term is in the model, and graphical if it contains every term the graph allows: all the cliques. Graphical models are the hierarchical models that are fully described by their graph. Toggle terms below and see which property fails and why.
Colours in the lattice: teal, in the model; red fill, in the model although one of its sub-terms is not (breaks hierarchy); red outline, not in the model but needed for hierarchy; gold outline, not in the model but a clique of the graph (needed for the model to be graphical); grey, not allowed by the graph. "Hierarchical closure" adds every sub-term; "graphical model" adds every clique.
code/ch19_log_linear_models.py (closure, is_hierarchical, term_graph, complete_sets, is_graphical, generator_string).