graph_edge_consensus — GRAPH population op

• 数据种类:table → table

• 调用: import fullseye as fs; fs.ledger.graph_edge_consensus(adjs, ordered=False, n_null=0, swaps_per_edge=5, seed=0)(要直接调用实现,import graphinv; graphinv.graph_edge_consensus(adjs, ordered=False, n_null=0, swaps_per_edge=5, seed=0);从台账取用则 opsgraph.get("graph_edge_consensus"))

用法

> 该算子的说明尚无译文,以下照原文给出。

How many individuals share each connection — K wiring matrices on one node order.

adjs is either a list of K square matrices or a table {name: matrix} (its insertion order is the individual order), all on the same node order (align the cell names first; a node absent from an individual is a zero row and column). Weights (synapse counts) are kept for the synapse shares; presence is > 0. Self-loops are dropped.

Returns a dict with:

• k (K), n, names, edges_per_individual and union (edges seen in at least one individual)

• occupancy_hist — h[c] = number of edges present in exactly c individuals, c = 0..K (h[0] is always 0: only the union is counted)

• jaccard — the K x K pairwise overlap |Ei ∩ Ej| / |Ei ∪ Ej|

• synapse_share — for each c, the fraction of all synapses (summed over individuals) on edges of occupancy c (with a 0/1 input: the edge share)

• with ordered=True (individuals listed in developmental order): the union is split by its presence pattern along the order into stable (present in all), added (absent, then present to the end: 0..01..1), lost (1..10..0) and flicker (anything else). The four sum to union.

• with n_null >= 2: every individual is rewired independently by degree-preserving swaps (each node's in/out degree kept exactly, checked per sample, fail-closed) and the occupancy histogram is re-counted. Reports occupancy_null_mean / occupancy_null_sd per c and shared_all_ratio (edges present in all K, observed over the null mean; inf when the null never shares one, so shared_all_null_max is reported too):

the chance level of "the same connection in every animal" given only each

animal's degrees.

Identities (the tests are built on these, not on fitted numbers):

sum_c c * h[c] == sum_i |E_i|; sum_c h[c] == union; K identical inputs give h[K] == union and every Jaccard == 1; the Jaccard matrix is symmetric with a unit diagonal; stable + added + lost + flicker == union; synapse_share sums to 1.

Raises ValueError: adjs not a list / table; fewer than 2 individuals; matrices of different sizes; any refusal of graph_degree_summary (non-square, negative, non-finite, string / bool / complex / masked input); an individual with no edges; n_null equal to 1 (no spread) or negative; swaps_per_edge < 1.

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• poc_connectome_across_decades — py -3.11 examples/poc_connectome_across_decades.py

• poc_connectome_across_worms — py -3.11 examples/poc_connectome_across_worms.py

类型可衔接的下一个算子(可接受 table 作为输入)

graph_core_persistence · tree_morphometry · tree_sholl · tree_run_length

同类别(population)

graph_strength_growth · graph_core_persistence


*Provenance: graphinv.py — GRAPH 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.