Spherical statistics in Python
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file spherical_stats-1.3-py3-none-any.whl
.
File metadata
- Download URL: spherical_stats-1.3-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ff90c11a9eccb0592dac2c076ddb987b0f03a82d14a7541c11adb2c96f8ec4 |
|
MD5 | 87a05dd84d07414e4dde2fc7ca52f4ee |
|
BLAKE2b-256 | a7375a2592ee799ce4c1f0f0f44201a579109ec8597dabb6472bb2bf73fe76f0 |