Result of Spatex.Inequality.polarization/3 (inequality.polarization.S).
statistic- the spatial polarization indexS = 1 - (c - k) / max(m - k, 1), 1 when every group forms one connected block of the graph.cis the number of connected components of the subgraph joining neighbors of the same group,mthe observations that have a group andk = max(n_g_components, n_a_components).n- number of observations;n_a_components- number of attribute groups (korlength(bins) - 1, nominal even when quantile edges collapse);n_g_components- connected components of the graph (islands included);n_i_components- components of the same-group subgraph.i_labels,a_labels,g_labels- per observation, the same-group component, the attribute group and the graph component, each numbered from 0 in order of first appearance. Observations that have no group (the lowest bin edge, or constant data) havenilini_labelsanda_labels.p_value- pseudo p-value, (the number of simulated indices at leaststatistic, plus one) overpermutations + 1;sim- the simulated indices (a list, or a{permutations}Nx.Tensorof type{:f, 64}withkeep_simulations: :tensor); bothnilwhenpermutationsis 0 (simalso withkeep_simulations: false).seedis the seed used (nilwithout permutations).
Summary
Types
@type t() :: %Spatex.Inequality.Polarization{ a_labels: [non_neg_integer() | nil], g_labels: [non_neg_integer()], i_labels: [non_neg_integer() | nil], n: non_neg_integer(), n_a_components: pos_integer(), n_g_components: pos_integer(), n_i_components: non_neg_integer(), p_value: float() | nil, permutations: non_neg_integer(), seed: non_neg_integer() | nil, sim: [float()] | Nx.Tensor.t() | nil, statistic: float() }