The source repository includes executable examples in examples/basic/.
Run examples from the repository root after installing PyRecEst or after installing a development checkout.
examples/basic/gaussian_multiplication.py multiplies several two-dimensional
Gaussian distributions and checks the result against the closed-form
information representation.
python examples/basic/gaussian_multiplication.pyexamples/basic/kalman_filter.py runs a one-dimensional constant-velocity
Kalman filter.
python examples/basic/kalman_filter.pyexamples/basic/kalman_filter_with_models.py runs the same
one-dimensional constant-velocity Kalman filter as kalman_filter.py, but
defines reusable linear-Gaussian transition and measurement model objects and
passes them to predict_model() and update_model().
python examples/basic/kalman_filter_with_models.pyexamples/basic/ukf_with_models.py demonstrates the additive-noise nonlinear
model-object API with an unscented Kalman filter. The transition model stores
the state propagation function and process-noise covariance; the measurement
model stores the measurement function and measurement-noise covariance.
python examples/basic/ukf_with_models.pyThis example follows the current backend limitations of
UnscentedKalmanFilter.
examples/basic/particle_filter_with_models.py demonstrates a particle-filter
loop with a sampleable transition model and a likelihood-based measurement
model.
python examples/basic/particle_filter_with_models.pyexamples/basic/multi_target_tracking.py runs a small linear/Gaussian
multi-Bernoulli-tracker scenario with two labeled targets, missed detections,
and clutter measurements.
python examples/basic/multi_target_tracking.pyThis example currently requires the NumPy backend.
examples/basic/von_mises_fisher_multiplication.py multiplies two
von Mises-Fisher distributions on the unit sphere and verifies the analytic
product relation.
python examples/basic/von_mises_fisher_multiplication.pyexamples/basic/custom_distribution_protocol.py shows a small user-defined
scalar distribution that satisfies the public dimension protocols without
inheriting from a PyRecEst distribution base class.
python examples/basic/custom_distribution_protocol.pyexamples/basic/custom_filter_protocol.py shows a small user-defined recursive
filter that satisfies the public dimension protocol and follows common PyRecEst
filter naming conventions.
python examples/basic/custom_filter_protocol.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.