diff --git a/docs/literature.rst b/docs/literature.rst index 04badbb..45e55c8 100644 --- a/docs/literature.rst +++ b/docs/literature.rst @@ -131,7 +131,10 @@ Multiple datasets :func:`~infoflow.regimes.infer_with_context` Stability selection / e-values :func:`~infoflow.stability.stability_selection` Weaker adjacency faithfulness pair search for lagged parents (``synergy_search``); lag-0 explanation families, - :func:`~infoflow.contemporaneous.contemporaneous_families` + :func:`~infoflow.contemporaneous.contemporaneous_families`; + benchmarks, + :func:`~infoflow.benchmarks.synergy_validation` and + :func:`~infoflow.benchmarks.planted_module_validation` Mixed-type CMI ``SkeletonSettings(estimator="mixed")`` Predictive (AGM-TE style) TE :func:`~infoflow.predictive.predictive_transfer_entropy` O-information rate :mod:`infoflow.oinfo` diff --git a/docs/validation.rst b/docs/validation.rst index 8991eee..d9f7735 100644 --- a/docs/validation.rst +++ b/docs/validation.rst @@ -88,6 +88,49 @@ its level with the larger pool. On null targets it rejected in 5 of 100 with 12 (1540 pairs) and in 6 of 100 with 20 processes (4560 pairs). Most of the extra time is the full permutation null of a pair that is found. +Synergy and weaker faithfulness +------------------------------- + +:func:`infoflow.benchmarks.synergy_validation` runs the mechanisms of :cite:`Hourican2026` +(:mod:`infoflow.datasets`): + +* lagged XORs at three noise levels; +* an XOR with a descendant, an asymmetric interaction and an OR; +* an XOR among 12 processes; +* the lag-0 motifs of :doc:`families`, whose population families come from their exact laws. + +:func:`infoflow.benchmarks.planted_module_validation` plants synthetic modules beside a +fixed background, as in the paper's neural application. ``validation/synergy.py --planted`` +reports both. The runs use 4000 samples, default settings, 10 replicates and 95% +Clopper-Pearson intervals: + +============================================= ======= ============ +Check Rate 95% interval +============================================= ======= ============ +XOR, flip 0.1 / 0.25 / 0.45: both parents 10 / 10 0.69--1.00 +XOR with a descendant: y from x1 and x2 10 / 10 0.69--1.00 +XOR with a descendant: w from y only 9 / 10 0.55--1.00 +Asymmetric interaction: both parents 10 / 10 0.69--1.00 +OR: both parents 10 / 10 0.69--1.00 +XOR among 12 processes: both parents 10 / 10 0.69--1.00 +Lag-0 XOR: the population family 9 / 10 0.55--1.00 +Lag-0 XOR with a descendant, OR, chain 10 / 10 0.69--1.00 +Lag-0 independent baseline 9 / 10 0.55--1.00 +Lag-0 dependent baseline (empty family) 10 / 10 0.69--1.00 +============================================= ======= ============ + +Each XOR row holds at all three noise levels, including flip 0.45 (whole-minus-sum +information 0.007 bits). That is below the 0.3-bit protection rule of +:cite:`Hourican2026`, which therefore misses it. + +With modules planted beside a noisy rule-90 cellular automaton of six cells, every true +parent was found in all replicates of every module (XOR, XOR with a descendant, OR, and +independent bits). Every module variable got exactly its parents in 8, 7, 8 and 9 of 10 +replicates. The rest had wrong extra parents, 0.2--0.4 per replicate over three or four +module variables. That is about what the per-stage levels allow (a greedy step and a pair +search at 0.05 each per target). Replicates share one background, so they are not +independent samples of it. + Large networks -------------- diff --git a/infoflow/benchmarks.py b/infoflow/benchmarks.py index b0926e9..2dca9b8 100644 --- a/infoflow/benchmarks.py +++ b/infoflow/benchmarks.py @@ -16,6 +16,10 @@ by precision, recall, specificity, and lag error; and motif networks whose layers are known (XOR synergy, a common driver, a chain), scored by how often the right layer, role, or flag is reported. + +*Synergy validation*: the mechanisms of :cite:`Hourican2026`, scored by whether jointly +informative parents and lag-0 explanation families are recovered, and synthetic modules +planted beside a fixed background. """ import time @@ -27,17 +31,20 @@ from .measures import cmi_from_joint, dense_codes, joint_table __all__ = ( + "MODULES", "conditioning_scaling", "latent_validation", "lorenz96_graph", "motif_validation", "network_validation", + "planted_module_validation", "random_network", "rank_metrics", "scaling_data", "score_edges", "score_network", "simulate_network", + "synergy_validation", ) ESTIMATORS = ("plugin", "miller_madow", "adaptive", "ksg") @@ -711,3 +718,199 @@ def record(name, ok): coords={"check": names}, attrs={"n_reps": n_reps, "n_samples": n_samples}, ) + + +def _proportions(checks, level=0.95): + """ + The rate and Clopper-Pearson interval of each check's outcomes, as a Dataset over (check,). + """ + from scipy.stats import binomtest + + names = list(checks) + successes = [int(np.sum(checks[c])) for c in names] + trials = [len(checks[c]) for c in names] + intervals = [binomtest(k, m).proportion_ci(level, method="exact") for k, m in zip(successes, trials, strict=True)] + return xr.Dataset( + { + "rate": (("check",), [k / m for k, m in zip(successes, trials, strict=True)]), + "ci_low": (("check",), [ci.low for ci in intervals]), + "ci_high": (("check",), [ci.high for ci in intervals]), + "successes": (("check",), successes), + "trials": (("check",), trials), + }, + coords={"check": names}, + ) + + +def synergy_validation(n_samples=4000, n_reps=10, settings=None, prng=None): + """ + How often jointly informative parents and lag-0 explanation families are recovered on the + mechanisms of :cite:`Hourican2026`. + + Lagged motifs (:mod:`infoflow.datasets`) are scored on the selected parents + (:func:`~infoflow.selection.infer_skeleton`): + + * ``xor_synergy`` with flips 0.1, 0.25 and 0.45: both parents found; + * ``xor_descendant``: ``y``'s parents are ``x1`` and ``x2``, and ``w``'s is ``y`` alone; + * ``asymmetric_interaction`` and ``or_gate``: both parents found; + * ``xor_among`` (12 processes, parents at lags 3 and 2): both parents found. + + Lag-0 motifs (:func:`~infoflow.datasets.contemporaneous_motif`) are scored by whether + :func:`~infoflow.contemporaneous.contemporaneous_families` returns exactly the population + family, which :func:`~infoflow.families.explanation_family` computes from the exact law. + + Parameters + ---------- + n_samples : int + n_reps : int + settings : SkeletonSettings, None + prng : None, int, Generator + + Returns + ------- + xarray.Dataset + ``rate`` with its 95% Clopper-Pearson interval (``ci_low``, ``ci_high``), and + ``successes`` and ``trials``, over (check,). + """ + from . import datasets + from .contemporaneous import contemporaneous_families + from .data import DiscreteData + from .embedding import Embedding + from .families import decisions_from_distribution, explanation_family + from .selection import infer_skeleton + + rng = as_generator(prng) + checks = {} + + def record(name, ok): + checks.setdefault(name, []).append(bool(ok)) + + def parents(array, targets, seed): + skeleton = infer_skeleton( + DiscreteData.from_discrete(array), Embedding(max_lag=1), targets=targets, settings=settings, prng=seed + ) + return {t: set(skeleton[t].parents()) for t in targets} + + reference = { + kind: set( + explanation_family( + decisions_from_distribution(datasets.contemporaneous_motif(kind=kind, law=True)) + ).candidates + ) + for kind in datasets.CONTEMPORANEOUS_MOTIFS + } + for _ in range(n_reps): + seed = int(rng.integers(2**32)) + for noise in (0.1, 0.25, 0.45): + found = parents(datasets.xor_synergy(n_samples, noise=noise, seed=seed), [2], seed) + record(f"xor, flip {noise}: both parents", found[2] == {0, 1}) + found = parents(datasets.xor_descendant(n_samples, seed=seed), [2, 3], seed) + record("xor with a descendant: y <- x1, x2", found[2] == {0, 1}) + record("xor with a descendant: w <- y only", found[3] == {2}) + found = parents(datasets.asymmetric_interaction(n_samples, seed=seed), [2], seed) + record("asymmetric interaction: both parents", found[2] == {0, 1}) + found = parents(datasets.or_gate(n_samples, seed=seed), [2], seed) + record("or: both parents", found[2] == {0, 1}) + found = parents(datasets.xor_among(n_samples, seed=seed), [11], seed) + record("xor among 12 processes: both parents", found[11] == {8, 10}) + for kind in datasets.CONTEMPORANEOUS_MOTIFS: + data = DiscreteData.from_discrete(datasets.contemporaneous_motif(n_samples, kind, seed=seed)) + skeleton = infer_skeleton(data, Embedding(max_lag=1), settings=settings, prng=seed) + families = contemporaneous_families(data, skeleton, prng=seed).families + exact = len(families) == 1 and set(families[0].candidates) == reference[kind] + record(f"lag-0 {kind}: the population family", exact) + result = _proportions(checks) + result.attrs.update(n_reps=n_reps, n_samples=n_samples) + return result + + +#: The synthetic modules of :func:`planted_module_validation`. +MODULES = ("xor", "xor_descendant", "or", "independent") + + +def _module(kind, n, rng): + """ + Synthetic module columns, and each module variable's true parents (module positions). + """ + from . import datasets + + if kind == "xor": + return datasets.xor_synergy(n, noise=0.1, seed=rng), {0: set(), 1: set(), 2: {0, 1}} + if kind == "xor_descendant": + return datasets.xor_descendant(n, seed=rng), {0: set(), 1: set(), 2: {0, 1}, 3: {2}} + if kind == "or": + return datasets.or_gate(n, seed=rng), {0: set(), 1: set(), 2: {0, 1}} + if kind == "independent": + return rng.integers(0, 2, (n, 3)), {0: set(), 1: set(), 2: set()} + raise ValueError(f"module must be one of {MODULES}") + + +def planted_module_validation(background, modules=MODULES, n_reps=10, settings=None, embeddings=None, prng=None): + """ + Recovery of synthetic modules planted beside a fixed background :cite:`Hourican2026`. + + Each replicate appends a freshly drawn module, independent of the background, to the + background's columns, and selects the parents of the module's variables + (:func:`~infoflow.selection.infer_skeleton`). The background supplies realistic + distractors without needing known ground truth. Modules: an XOR (``xor``), an XOR with a + descendant (``xor_descendant``), an OR (``or``), and three independent bits as a + negative control (``independent``). Replicates share one background, so they are not + independent samples of the background's system. + + Parameters + ---------- + background : array_like + Discrete samples, shape (samples, processes). + modules : sequence of str + n_reps : int + settings : SkeletonSettings, None + embeddings : Embedding or list of Embedding, None + Default: one lag for every process. A list must also cover the module columns. + prng : None, int, Generator + + Returns + ------- + xarray.Dataset + Over (module,): ``recovered`` (every true parent of every module variable is found; + wrong extra parents allowed) and ``exact`` (no wrong parents either), each with its + 95% Clopper-Pearson interval over (module, bound) as ``recovered_ci`` and + ``exact_ci``; and ``false_parents``, the mean number of wrong parents of module + variables per replicate, from the background or the module. + """ + from .data import DiscreteData + from .embedding import Embedding + from .selection import infer_skeleton + + rng = as_generator(prng) + background = np.asarray(background) + B = background.shape[1] + recovered, exact, false = {}, {}, {} + for kind in modules: + for _ in range(n_reps): + columns, truth = _module(kind, len(background), rng) + data = DiscreteData.from_discrete(np.concatenate([background, columns], axis=1)) + targets = [B + k for k in truth] + skeleton = infer_skeleton( + data, + embeddings or Embedding(max_lag=1), + targets=targets, + settings=settings, + prng=int(rng.integers(2**32)), + ) + found = {k: set(skeleton[B + k].parents()) for k in truth} + expected = {k: {B + p for p in truth[k]} for k in truth} + recovered.setdefault(kind, []).append(all(expected[k] <= found[k] for k in truth)) + exact.setdefault(kind, []).append(all(found[k] == expected[k] for k in truth)) + false.setdefault(kind, []).append(sum(len(found[k] - expected[k]) for k in truth)) + rec, ex = _proportions(recovered), _proportions(exact) + return xr.Dataset( + { + "recovered": (("module",), rec.rate.values), + "recovered_ci": (("module", "bound"), np.stack([rec.ci_low.values, rec.ci_high.values], axis=1)), + "exact": (("module",), ex.rate.values), + "exact_ci": (("module", "bound"), np.stack([ex.ci_low.values, ex.ci_high.values], axis=1)), + "false_parents": (("module",), [float(np.mean(false[k])) for k in modules]), + }, + coords={"module": list(modules), "bound": ["low", "high"]}, + attrs={"n_reps": n_reps, "background_processes": B}, + ) diff --git a/infoflow/datasets.py b/infoflow/datasets.py index 01641e1..51dc076 100644 --- a/infoflow/datasets.py +++ b/infoflow/datasets.py @@ -2,25 +2,34 @@ Benchmark data with known coupling structure. All generators take a ``seed`` and return an array of shape (samples, processes), -except :func:`spiking_glm`, which returns spike times and the true couplings. +except :func:`spiking_glm`, which returns spike times and the true couplings, and +:func:`contemporaneous_motif` with ``law=True``, which returns the exact distribution. """ +import itertools + import numpy as np __all__ = ( + "CONTEMPORANEOUS_MOTIFS", + "asymmetric_interaction", "chain", "common_driver", + "contemporaneous_motif", "coupled_logistic", "coupled_tent", "lorenz96", "multiscale_ou", "mute_network", "noisy_eca", + "or_gate", "orthogonal_features", "spiking_glm", "switching_coupling", "tent_ring_coupling", "var_process", + "xor_among", + "xor_descendant", "xor_synergy", ) @@ -270,6 +279,112 @@ def xor_synergy(n=3000, noise=0.0, seed=None): return np.stack([x1, x2, y], axis=1) +def xor_descendant(n=3000, noise=0.1, descendant_noise=0.1, seed=None): + """ + Binary XOR with a descendant :cite:`Hourican2026`: ``y_t = x1_{t-1} xor x2_{t-1}`` + (flipped with probability `noise`) and ``w_t = y_{t-1}`` (flipped with probability + `descendant_noise`). Columns (x1, x2, y, w). + """ + rng = _rng(seed) + x1, x2 = rng.integers(0, 2, n), rng.integers(0, 2, n) + y = np.roll(x1 ^ x2, 1) ^ (rng.random(n) < noise) + w = np.roll(y, 1) ^ (rng.random(n) < descendant_noise) + return np.stack([x1, x2, y, w], axis=1) + + +def asymmetric_interaction(n=3000, seed=None): + """ + The asymmetric interaction of :cite:`Hourican2026`: ``x1 ~ Bernoulli(0.35)``, + ``x2 ~ Bernoulli(0.6)``, and ``y_t = 1`` with probability 0.1, 0.9, 0.8 or 0.2 when + ``(x1_{t-1}, x2_{t-1})`` is 00, 01, 10 or 11. Columns (x1, x2, y). + """ + rng = _rng(seed) + x1, x2 = (rng.random(n) < 0.35).astype(int), (rng.random(n) < 0.6).astype(int) + p = np.array([0.1, 0.9, 0.8, 0.2])[2 * np.roll(x1, 1) + np.roll(x2, 1)] + return np.stack([x1, x2, (rng.random(n) < p).astype(int)], axis=1) + + +def or_gate(n=3000, noise=0.1, seed=None): + """ + Binary ``y_t = x1_{t-1} or x2_{t-1}`` (flipped with probability `noise`). Columns (x1, x2, y). + """ + rng = _rng(seed) + x1, x2 = rng.integers(0, 2, n), rng.integers(0, 2, n) + y = np.roll(x1 | x2, 1) ^ (rng.random(n) < noise) + return np.stack([x1, x2, y], axis=1) + + +def xor_among(n=4000, n_processes=12, parents=((8, 3), (10, 2)), noise=0.1, seed=None): + """ + Independent fair bits, except the last process: the XOR of the given ``(process, lag)`` + parents, flipped with probability `noise`. With many processes and long lags the pair + lies beyond a small pair-search pool (``SkeletonSettings.max_pairs``). + """ + rng = _rng(seed) + x = rng.integers(0, 2, (n, n_processes)) + y = np.zeros(n, dtype=int) + for p, lag in parents: + y ^= np.roll(x[:, p], lag) + x[:, -1] = y ^ (rng.random(n) < noise) + return x + + +#: The kinds of :func:`contemporaneous_motif`. +CONTEMPORANEOUS_MOTIFS = ("xor", "xor_descendant", "or", "chain", "independent_baseline", "dependent_baseline") + + +def _bit(p, value): + return p if value else 1 - p + + +def _motif(kind): + """ + The number of variables of a lag-0 motif, and its unnormalized probability of an outcome. + """ + if kind == "xor": + return 3, lambda o: _bit(0.1, o[2] ^ o[0] ^ o[1]) + if kind == "xor_descendant": + return 4, lambda o: _bit(0.1, o[2] ^ o[0] ^ o[1]) * _bit(0.1, o[3] ^ o[2]) + if kind == "or": + return 3, lambda o: _bit(0.1, o[2] ^ (o[0] | o[1])) + if kind == "chain": + return 4, lambda o: _bit(1 / 3, o[0]) * _bit(0.1, o[1] ^ o[0]) * _bit(0.1, o[2] ^ o[1]) * _bit(0.1, o[3] ^ o[2]) + if kind == "independent_baseline": + return 4, lambda o: _bit(0.1, o[2] ^ o[0] ^ o[1]) * _bit(0.1, o[3] ^ o[1]) + if kind == "dependent_baseline": + return 4, lambda o: _bit(0.2, o[1] ^ o[0]) * _bit(0.1, o[2] ^ o[0] ^ o[1]) * _bit(0.1, o[3] ^ o[0]) + raise ValueError(f"kind must be one of {CONTEMPORANEOUS_MOTIFS}") + + +def contemporaneous_motif(n=4000, kind="xor", seed=None, law=False): + """ + Binary motifs whose interactions all happen within one sample :cite:`Hourican2026`, as + independent samples. Every flip has probability 0.1 unless stated. + + * ``'xor'``: ``z = x xor y``; columns (x, y, z). + * ``'xor_descendant'``: ``z = x xor y`` and ``w = z``; (x, y, z, w). + * ``'or'``: ``z = x or y``; (x, y, z). + * ``'chain'``: ``x0 ~ Bernoulli(1/3)``, and each next variable copies the previous; four + columns. + * ``'independent_baseline'``: ``z = x xor y`` and ``w = y``; (x, y, z, w). + * ``'dependent_baseline'``: ``y = x`` (flip 0.2), ``z = x xor y`` and ``w = x``; no DAG + is weakly adjacency faithful to it. + + With `law`, the exact distribution is returned instead, as a dit ``Distribution``, for + reference families (:func:`infoflow.families.decisions_from_distribution`). + """ + size, weight = _motif(kind) + outcomes = list(itertools.product((0, 1), repeat=size)) + pmf = np.array([weight(o) for o in outcomes]) + pmf /= pmf.sum() + if law: + import dit + + return dit.Distribution(outcomes, list(pmf)) + rng = _rng(seed) + return np.array(outcomes)[rng.choice(len(outcomes), size=n, p=pmf)] + + def common_driver(n=3000, noise=0.05, seed=None): """ Binary: z drives x at lag 1 and y at lag 2. Columns (x, y, z). diff --git a/tests/test_synergy.py b/tests/test_synergy.py new file mode 100644 index 0000000..cffa44a --- /dev/null +++ b/tests/test_synergy.py @@ -0,0 +1,69 @@ +""" +Tests for the synergy generators and validations (Hourican & Quax 2026 mechanisms). +""" + +import numpy as np +import pytest + +from infoflow import datasets +from infoflow.benchmarks import planted_module_validation, synergy_validation +from infoflow.selection import SkeletonSettings + +FAST = SkeletonSettings( + n_perm_max_stat=50, n_perm_min_stat=50, n_perm_omnibus=100, n_perm_max_seq=100, n_perm_pairs=50, n_perm_tdmi=50 +) + + +def test_lagged_generators(): + x = datasets.xor_descendant(4000, seed=0) + assert x.shape == (4000, 4) + assert np.mean(x[1:, 2] == x[:-1, 0] ^ x[:-1, 1]) == pytest.approx(0.9, abs=0.02) + assert np.mean(x[1:, 3] == x[:-1, 2]) == pytest.approx(0.9, abs=0.02) + a = datasets.asymmetric_interaction(20000, seed=0) + assert a[:, 0].mean() == pytest.approx(0.35, abs=0.01) and a[:, 1].mean() == pytest.approx(0.6, abs=0.01) + cell = (a[:-1, 0] == 1) & (a[:-1, 1] == 0) + assert a[1:, 2][cell].mean() == pytest.approx(0.8, abs=0.03) + g = datasets.or_gate(4000, seed=0) + assert np.mean(g[1:, 2] == g[:-1, 0] | g[:-1, 1]) == pytest.approx(0.9, abs=0.02) + m = datasets.xor_among(4000, seed=0) + assert m.shape == (4000, 12) + assert np.mean(m[3:, 11] == m[:-3, 8] ^ m[1:-2, 10]) == pytest.approx(0.9, abs=0.02) + + +@pytest.mark.parametrize("kind", datasets.CONTEMPORANEOUS_MOTIFS) +def test_contemporaneous_motif_samples_its_law(kind): + law = datasets.contemporaneous_motif(kind=kind, law=True) + sample = datasets.contemporaneous_motif(20000, kind, seed=0) + assert sample.shape[1] == law.outcome_length() + for i in range(sample.shape[1]): + assert sample[:, i].mean() == pytest.approx(law.marginal([i])[(1,)], abs=0.015) + + +def test_contemporaneous_motif_kind(): + with pytest.raises(ValueError, match="kind"): + datasets.contemporaneous_motif(kind="and") + + +def test_synergy_validation(): + result = synergy_validation(n_samples=2000, n_reps=1, settings=FAST, prng=0) + assert set(result.data_vars) == {"rate", "ci_low", "ci_high", "successes", "trials"} + assert result.sizes["check"] == 14 and (result.trials == 1).all() + assert ((result.ci_low <= result.rate) & (result.rate <= result.ci_high)).all() + for check in ( + "xor, flip 0.1: both parents", + "xor among 12 processes: both parents", + "lag-0 xor: the population family", + ): + assert float(result.rate.sel(check=check)) == 1 + + +def test_planted_module_validation(): + background = datasets.noisy_eca(2000, n_cells=4, seed=1) + result = planted_module_validation(background, modules=("xor", "independent"), n_reps=1, settings=FAST, prng=0) + assert list(result.module.values) == ["xor", "independent"] + assert float(result.recovered.sel(module="xor")) == 1 + assert ((result.exact <= result.recovered) & (result.false_parents >= 0)).all() + assert (result.recovered_ci.sel(bound="low") <= result.recovered).all() + assert result.attrs["background_processes"] == 4 + with pytest.raises(ValueError, match="module"): + planted_module_validation(background, modules=("nand",), n_reps=1, settings=FAST) diff --git a/validation/synergy.py b/validation/synergy.py new file mode 100644 index 0000000..299dc43 --- /dev/null +++ b/validation/synergy.py @@ -0,0 +1,42 @@ +""" +Synergy validation: jointly informative parents and lag-0 explanation families on the mechanisms of +Hourican & Quax (2026), and synthetic modules planted beside a fixed background. + +Example:: + + python validation/synergy.py --samples 4000 --reps 10 --planted +""" + +import argparse + +from infoflow import benchmarks, datasets + + +def main(): + parser = argparse.ArgumentParser(description=__doc__.splitlines()[1]) + parser.add_argument("--samples", type=int, default=4000) + parser.add_argument("--reps", type=int, default=10) + parser.add_argument("--seed", type=int, default=0) + parser.add_argument( + "--planted", action="store_true", help="also plant modules beside a noisy rule-90 cellular automaton" + ) + args = parser.parse_args() + ds = benchmarks.synergy_validation(args.samples, args.reps, prng=args.seed) + for check in ds.check.values: + row = ds.sel(check=check) + print(f"{float(row.rate):5.2f} [{float(row.ci_low):.2f}, {float(row.ci_high):.2f}] {check}", flush=True) + if args.planted: + background = datasets.noisy_eca(args.samples, n_cells=6, seed=args.seed) + planted = benchmarks.planted_module_validation(background, n_reps=args.reps, prng=args.seed) + for module in planted.module.values: + row = planted.sel(module=module) + low, high = (float(v) for v in row.recovered_ci.values) + print( + f"{float(row.recovered):5.2f} [{low:.2f}, {high:.2f}] exact {float(row.exact):.2f} " + f"false parents {float(row.false_parents):.2f} planted {module}", + flush=True, + ) + + +if __name__ == "__main__": + main()