Skip to main content

spherical_stats

Spherical statistics in Python with a focus on accuracy and speed. Unlike many other implementations of spherical distributions, all probability distributions in spherical_stats are fitted exactly using numerical optimization and root-finding techniques and do not rely on approximations. Computationally intensive parts are accelerated using numba.

Installation

pip install spherical_stats

Documentation

Refer to the online documentation for examples and API reference.

Features:

  • Visualization helper functions to quickly generate data to be plotted with plotly/matplotlib/ipyvolume:
    • Sphere creation and evaluation of a function over its surface
    • Spherical histogram
  • Descriptive statistics:
    • Spherical mean and spherical variance
    • Orientation tensor
  • Parametric distributions with scipy.stats like API:
    • Modeling axial data: Watson distribution, Angular central gaussian distribution (ACG)
    • Modeling vector data: Von Mises-Fisher distribution (VMF), Elliptically symmetrical angular gausian distribution (ESAG),

Example usage of the distributions:

from spherical_stats import ESAG
import numpy as np

esag_params = np.array([1,3,5,2,6])

#Instantiate ESAG class with known parameters
esag_known = ESAG(esag_params)

#generate 500 ESAG samples and calculate their PDF vals
samples = esag_known.rvs(500)
pdf_vals = esag.pdf(samples)

#Instantiate ESAG class and fit distribution parameters given samples
esag_unknown = ESAG()
esag_unknown.fit(samples, verbose = True)

Metadata

Release files for spherical-stats 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for spherical-stats 1.3
File Interpreter ABI Platform Actions
spherical_stats-1.3-py3-none-any.whl Python 3 none any Details for spherical_stats-1.3-py3-none-any.whl

Release files / spherical_stats-1.3-py3-none-any.whl

Download URL spherical_stats-1.3-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2ff90c11a9eccb0592dac2c076ddb987b0f03a82d14a7541c11adb2c96f8ec4
BLAKE2b-256 checksum
How to use checksums
a7375a2592ee799ce4c1f0f0f44201a579109ec8597dabb6472bb2bf73fe76f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for spherical-stats 1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page