This directory contains small executable examples that demonstrate common PyRecEst workflows.
Run examples from the repository root after installing PyRecEst or after installing a development checkout.
basic/gaussian_multiplication.py multiplies several two-dimensional Gaussian
distributions and checks the result against the closed-form information
representation.
Run it with:
python examples/basic/gaussian_multiplication.pybasic/kalman_filter.py runs a one-dimensional constant-velocity Kalman filter.
It demonstrates how to:
- import arrays through
pyrecest.backend; - initialize
KalmanFilterwith a mean and covariance; - call
predict_linearandupdate_linear; and - read the current point estimate and covariance.
Run it from the repository root with:
python examples/basic/kalman_filter.pybasic/kalman_filter_with_models.py runs the same constant-velocity Kalman
filter as basic/kalman_filter.py, but defines reusable linear-Gaussian model
objects and passes them to predict_model and update_model.
Run it from the repository root with:
python examples/basic/kalman_filter_with_models.pybasic/ukf_with_models.py demonstrates additive-noise transition and
measurement model objects with UnscentedKalmanFilter.
Run it from the repository root with:
python examples/basic/ukf_with_models.pyThis example follows the current backend limitations of
UnscentedKalmanFilter.
basic/particle_filter_with_models.py demonstrates a particle-filter loop with
a sampleable transition model and a likelihood-based measurement model.
Run it from the repository root with:
python examples/basic/particle_filter_with_models.pybasic/multi_target_tracking.py runs a small linear/Gaussian
multi-Bernoulli-tracker scenario with two labeled targets, missed detections,
and clutter measurements.
Run it with:
python examples/basic/multi_target_tracking.pyThis example currently requires the NumPy backend.
basic/scgp_measurement_reliability.py runs one full star-convex
Gaussian-process tracker update with per-measurement reliability weights and an
active-measurement mask. It demonstrates how to down-weight partially reliable
extended-object measurements and skip unsupported measurements without changing
the measurement array.
Run it with:
python examples/basic/scgp_measurement_reliability.pybasic/von_mises_fisher_multiplication.py multiplies two von Mises-Fisher
distributions on the unit sphere and verifies the analytic product relation.
Run it with:
python examples/basic/von_mises_fisher_multiplication.pySelect a non-default backend by setting PYRECEST_BACKEND before running the
script. For example, on a bash-compatible shell:
PYRECEST_BACKEND=pytorch python examples/basic/kalman_filter.pyInstall the matching optional dependency extra before using a non-default backend. See backend compatibility for known backend-specific limitations.
notebooks/ is reserved for interactive examples.