Skip to main content

Last-layer uncertainty modeling via zonotopic representations.

Project description

Zonolayer

Matthew McCann
University of Strathclyde, 2025

Developed with guidance and support from Marco de Angelis, University of Strathclyde

Python Version License: MIT PyPI Version

Zonolayer is a Python package for last-layer uncertainty modeling via zonotopic representations.
It provides zonotopic output bounds and statistical prediction intervals for neural networks with interval-bounded outputs, enabling precise and interpretable uncertainty quantification in regression tasks.


Features

  • Compute zonotopic bounds for last-layer outputs.
  • Combine statistical prediction intervals with interval uncertainty.
  • Compatible with PyTorch networks exposing latent features.
  • Modular, research-friendly, and easy to use.

By default, Zonolayer relies on NumPy for all numerical computations and interval handling.

If you require more advanced interval arithmetic (e.g., using pyinterval or other specialized packages), you can install the optional dependencies and modify the code accordingly, or submit a request for support to be added. I appreciate any and all feedback.

IPM support using the PyIPM library by J. Sadeghi


Installation

Ensure all requirements from requirements.txt are installed to reduce any potential issues.

pip install zonolayer

Getting Started

See basic_usage.py in the examples directory for the quickest method to get up and running and start experimenting with the library.

Example Plots

Zonolayer produces zonotopic bounds and statistical prediction intervals. Example outputs:

Zonotopic bounds Zonotopic bounds 2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zonolayer-0.4.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zonolayer-0.4.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file zonolayer-0.4.0.tar.gz.

File metadata

  • Download URL: zonolayer-0.4.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zonolayer-0.4.0.tar.gz
Algorithm Hash digest
SHA256 07a14796d809f15094184d89e51eb02113c89fa55de02efadbddfd8d3ed40d89
MD5 1278b3d8602f491148efe0565f523cc1
BLAKE2b-256 a7d5fb2583c200d4aec00d7a9fb56e4ee4c90c9ee6ede3b6c64696c015365f16

See more details on using hashes here.

File details

Details for the file zonolayer-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: zonolayer-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zonolayer-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d2f4a8bcadad674107a107b135924f36768b77ddcb0862848e7bea42b7414e2
MD5 901e6f5444e3a03417a8be3529873f86
BLAKE2b-256 de14716afced38a57a03ded6902325a2d2b845ae37b203c278043e272c4271cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page