Conversation
…ethod p-value combiner - ewstools/spatial.py: morans_i(), morans_i_permutation_test(), SpatialEWS class following the existing MultiTimeSeries conventions. - ewstools/pvalues.py: combine_pvalues_ebm(), a real implementation of Poole et al. (2016)'s Empirical Brown's Method. - 21 new tests, 0 regressions on the existing 32. - CONTRIBUTION_spatial_significance.md documents the identified gap. Local branch, not yet submitted as a pull request.
…liques - ewstools : pull request réellement soumise (ThomasMBury/ewstools#482), statut passé de "développé, pas encore soumis" à "soumis (pull request ouverte)". - hopfieldkit : dépôt GitHub public créé (https://github.com/C95234/hopfieldkit), lien ajouté à la page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi @C95234 — thanks for this, and apologies that it sat quiet for a few days. That's on me. I've read it properly now. You did the things that make a contribution easy to take seriously: you checked whether the gap was real before writing anything, the tests are substantive rather than decorative, you matched the conventions already in the package, and the design follows Dakos et al. (2010) closely. Moran's coefficient at distance 1, plus Kendall tau against the control parameter, is exactly that protocol. I had a look at Hélios as well. Pushing early-warning methods out into domains they weren't developed on is a particular interest of mine, too, so the cross-domain framing is one I actively care about. There are a few things I'd want to work through with you — a couple of them scientific rather than cosmetic — but none of them change my interest in the direction you're taking. I'm going through it carefully and talking it over with Tom, and I'll come back early next week with something specific. Thanks for taking the trouble to contribute this. — Bruce |
Summary
Two additions, developed while building Hélios, a research/outreach project that replicates early-warning-signal methods on new domains and found itself needing both of these while doing so:
ewstools/spatial.py:morans_i(),morans_i_permutation_test(), and aSpatialEWSclass following the existingMultiTimeSeriesconventions (data->state->ews, transition-aware,compute_ktau()for trend-testing).ewstoolscovers the temporal branch of the critical-slowing-down literature thoroughly but has no equivalent for the spatial branch (Dakos et al., 2010; still active, see MacLaren, Aihara & Masuda, 2025) — confirmed absent by direct inspection ofcore.py/helpers.pybefore writing any code.ewstools/pvalues.py:combine_pvalues_ebm(), an implementation of the Empirical Brown's Method (Poole et al., 2016) for combining possibly-correlated p-values from several indicators — useful once a user computes both a temporal and a spatial indicator on the same system and wants to know if both are unusual at once, which Fisher's method alone would get wrong under correlation.Full write-up of the identified gap and the approach:
CONTRIBUTION_spatial_significance.md.Testing
tests/test_spatial.py,tests/test_pvalues.py): hand-computed Moran's I examples, known limiting cases (checkerboard, smooth gradient, constant field), the classical permutation-test propertyE[I] -> -1/(N-1), and for the p-value combiner: reduces to plain Fisher when inputs are independent, and gives a less extreme combined p-value than naive Fisher when inputs are positively correlated (the point of the correction).[Unreleased]CHANGELOG.mdentry following the project's existing format.Happy to adjust API shape, naming, or scope based on maintainer feedback — opening this as a starting point for discussion rather than assuming the exact design is final.
🤖 Generated with Claude Code