jacobnzw/SSMToybox

Project Restructuring and Consolidation

Closed this issue · 0 comments

Turn the following packages (directories) into modules (files):

  • inference: Many classical filters (EKF,UKF, CKF, GHKF) contained in cubature.py, extended.py, gausshermite.py, unscented.py should be moved to ssinfer.py, because they don't take up much space anyway. The files are mostly very short.
    • The short code snippets showcasing each filter can be moved to demos package.
  • models: State-space models don't need to be separated into modules, because there isn't that many of them.
    • The code in the main() has the same role as the code snippets in files containing the filters. Fusing the code and moving it into a demos package is much more sensible.
  • transforms: The BQ transforms deserve their own package, because they tightly depend on bqmodel.py and bqkernel.py. The classical transforms can be moved from quad.py and taylor.py into mtran.py.

It might later turn out, that the demos shouldn't be a package either :). Who knows?!

The above changes should result in the following project structure:

./bq
./demos
./docs
./tests
dynsys.py
mtran.py
ssinf.py
ssmod.py
utils.py

Contents:

  • ./bq: BQ transforms, because they are more complex. Contents: bqmtran.py, bqmod.py, bqkern.py
  • ./demos: demos showcasing each filter, or comparing filter performance on each example
  • ./docs: Sphinx generated documentation
  • ./tests: all the current test files, test cases for each filter separately so that failures can be easily identified.
  • dynsys.py (formerly known as datagen.py): base classes with code for simulating continuous-time systems with any noise and specific systems in sub-classes.
  • mtran.py: base classes for general moment transform and sigma-point transforms, sub-classes for the classical moment transforms such as Unscented, Taylor, Gauss-Hermite, fully-symmetric, Monte Carlo, spherical-radial.
  • ssinf.py: base classes, concrete inference algorithms (filters/smoothers) such as EKF, UKF, CKF, GHKF, GPQKF, TPQKF, filters for Student densities etc.
  • ssmod.py: base classes for various SSMs, concrete SSMs like demodulation, ungm, tracking, pendulum, oscillators, etc.
  • utils.py: functions for evaluating various performance metrics (RMSE, INC, NCI, NLL) and helper functions (variance bootstrapping etc.)