pygeotypes: A Dependency-Light Shape-Catalogue Library with Class-Conditional Conformal Assignment for Physical Response Signals
Many physical systems are characterised through the shape of a response signal: the pressure transient of a fractured reservoir, the drawdown of a hydrogeology pumping test, the temperature curve of a thermal-response test. A recent methodology, GeoTypes (Kamel Targhi et al., 2026, Computational Geosciences), turns an ensemble of such signals into a catalogue of behaviour types by clustering their shapes. Two practical gaps stand between that methodology and routine use. First, the natural building blocks in mid-2026 are awkward to deploy: the maintained k-medoids implementations are either unmaintained (scikit-learn-extra), copyleft (the fast Rust kmedoids, GPL-3), or drag native dependencies that do not run in a browser sandbox (tslearn, aeon). Second, assigning a new signal to a catalogue by nearest medoid gives no guarantee and no way to say 'this shape is unlike anything in the catalogue'. We present pygeotypes, a dependency-light library whose core is pure NumPy/SciPy, so it runs unchanged offline and in the browser (Pyodide), that packages the full GeoTypes pipeline (log-resampling, Bourdet derivative, band-constrained dynamic time warping, PAM k-medoids with silhouette model selection, an exact-JSON catalogue artifact) and adds a class-conditional split-conformal assignment layer. The conformal layer returns, for a new signal, a per-type p-value and the prediction set of behaviour types consistent with it at a requested confidence, and an empty set flags the signal as out of catalogue. On a reproducible pressure-transient benchmark the marginal empirical coverage tracks or exceeds the nominal 1-alpha target across the operating range (0.960 at alpha=0.05, 0.938 at 0.10, 0.885 at 0.15, 0.800 at 0.20); per class, one of the two behaviours stays covered at every level while the other falls below target for alpha of 0.15 and above. The prediction sets stay informative (mean size 1.0 down to 0.7), and every alien shape tested is flagged out-of-catalogue at all confidence levels. These results come from a single seeded run and regenerate exactly from the archived script and artifacts. The underlying shape-catalogue methodology is the contribution of Kamel Targhi et al. (2026, doi:10.1007/s10596-026-10459-w); pygeotypes implements it and adds the conformal assignment layer. Package on PyPI (pip install pygeotypes): https://pypi.org/project/pygeotypes/ . Source code and reproducible artifacts (MIT): https://github.com/fsantibanezleal/CAOS_GeoTypes .
Authors
- Felipe Santibañez-Leal (ORCID: https://orcid.org/0000-0002-0150-3246)
Institutions
- Open University of Cyprus (CY)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-18
- DOI
- https://doi.org/10.5281/zenodo.21511918
- Primary Topic
- Time Series Analysis and Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.00