Skip to main content

Adaptive Gaussian Mixture State Estimation

Project description

pyest_logo

PyEst: Adaptive Gaussian Mixture State Estimation

Python application

Basic Usage

Import the gm module of PyEst as well as numpy and matplotlib

import numpy as np
import matplotlib.pyplot as plt
import pyest.gm as gm

Create a three-mixand two-dimensional Gaussian mixture:

# mixand means (nc,nx)
m = np.array([[0,0], [1,2], [0,-1]])
# mixand covariance matrices (nc,nx,nx)
P = np.array([[[1,0], [0,1]],
              [[2, 0.5], [0.5,3]],
              [[0.5, -0.1], [-0.1, 1]]])
# mixand weights (nc,)
w = gm.equal_weights(3)
# contruct the Gaussian mixture
p = gm.GaussianMixture(w, m, P)

Compute the mean and covariance of the distribution:

# compute and print the mean
print(p.mean())
# compute and print the covariance
print(p.cov())

Plot the Gaussian mixture

pp, XX, YY = p.pdf_2d()
fig = plt.figure()
ax = fig.add_axes(111)
ax.contourf(XX,YY,pp,100)

Apply a linear transformation to the mixture

dt = 5
F = np.array([[1, dt], [0, 1]])
my = np.array([F@m for m in p.m])
Py = np.array([F@P@F.T for P in p.P])
py = gm.GaussianMixture(p.w, my, Py)

Plot the transformed Gaussian mixture

pp, XX, YY = py.pdf_2d()
fig = plt.figure()
ax = fig.add_axes(111)
ax.contourf(XX,YY,pp,100)
plt.show()

Installation

OS X (zsh)

To install, run

pip install pyest

To install packages needed for running the examples, run

pip install 'pyest[examples]'

OS X (bash), Windows (cmd prompt)

To install, run

pip install pyest

To install packages needed for running the examples, run

pip install pyest[examples]

Citing this work

If you use this package in your scholarly work, please cite the following articles:

K.A. LeGrand and S. Ferrari, “Split Happens! Imprecise and Negative Information in Gaussian Mixture Random Finite Set Filtering,” Journal of Advances in Information Fusion, Vol 17, No. 2, December, 2022

J. Kulik and K.A. LeGrand, “Nonlinearity and Uncertainty Informed Moment-Matching Gaussian Mixture Splitting,” https://arxiv.org/abs/2412.00343

@article{legrand2022SplitHappensImprecise,
  title = {Split {{Happens}}! Imprecise and Negative Information in {G}aussian Mixture Random Finite Set Filtering},
  author = {LeGrand, Keith A. and Ferrari, Silvia},
  year = {2022},
  month = dec,
  journal = {Journal of Advances in Information Fusion},
  volume = {17},
  number = {2},
  eprint = {2207.11356},
  primaryclass = {cs, eess},
  pages = {78--96},
  doi = {10.48550/arXiv.2207.11356},
}
@misc{kulik2024NonlinearityUncertaintyInformed,
  title = {Nonlinearity and {{Uncertainty Informed Moment-Matching Gaussian Mixture Splitting}}},
  author = {Kulik, Jackson and LeGrand, Keith A.},
  year = {2024},
  month = nov,
  number = {arXiv:2412.00343},
  eprint = {2412.00343},
  primaryclass = {stat},
  publisher = {arXiv},
  doi = {10.48550/arXiv.2412.00343},
  urldate = {2025-01-01},
  archiveprefix = {arXiv}
}

Documentation

For more information about PyEst, please see the documentation.

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

pyest-0.3.1.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

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

pyest-0.3.1-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file pyest-0.3.1.tar.gz.

File metadata

  • Download URL: pyest-0.3.1.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pyest-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c484e41885e324d9c41916a5ab3b3b4913d7a058158bf321eb7e6a1db0c87d1e
MD5 ee90ffa0080bc2efeaa322c23698fbd9
BLAKE2b-256 afde65e70b1f76c59a6278afe301412ef2c93b71f5fa5ecffecb0458b5a4196f

See more details on using hashes here.

File details

Details for the file pyest-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyest-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pyest-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afa43ffc1c72998907bf5abc8281bf6ab61d15b3a9458e6cb7809f7f38d8b592
MD5 30db614994a461687e43a33739794c9a
BLAKE2b-256 6a71e495f07687fb71d73664f41ce39317d44b69208a81ddc2fa8ea9a291526e

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