Rust · burn · second-order autodiff · manifolds
skoro
Write a probabilistic model once. Run any inference on it.
A robot's poses and the landmarks it sights, written once as a model, drawn a hundred times and estimated together, with uncertainties that hold the truth as often as they claim to. Read the example →
Skoro is a Rust library for writing a probabilistic model once, generatively, and running different inference algorithms on the same model. A model is built forward, the way it is thought of: each uncertain quantity, and its conditional distribution given the quantities it depends on. The library records the structure as it is built, and an inference algorithm reads from that structure what it needs: it runs when the model meets its assumptions, and says what is missing when it does not.
It is built for the model that lives over time. In sequential estimation, for robots and other autonomous systems, a model grows as measurements arrive, retires old states as they stop mattering, is held under several hypotheses about what the measurements came from, and is estimated on other threads while all of that happens. Skoro’s quantities may live on manifolds such as rotations and poses, and its derivatives, of first and second order, are taken in their tangent spaces.
Start with what skoro is, and who it is for, or with the pose graph above. The rest is read along three tracks, each of which can be followed alone: the guide, top-down, from the code a user writes; the concepts, bottom-up, from the library’s spaces and operations; and the mathematics, the notes skoro rests on, in the order in which they build on each other. Reading these docs says how they fit together.
Three ways to read
The workspace
The crates in layers, foundations first: each is built on the crates it names, which lie in the layers above it, and leads to the order in which to read its modules.
skoro-tensorThe layer over burn: tensors at an explicit precision on a supported deviceskoro-eliminationElimination in square-root form: factored least squares on the hostskoro-coreQuantities, operations and their derivatives, models, terms and queries onskoro-tensorskoro-normalThe normal distribution, on every space whose chart is global onskoro-coreskoro-spatialThe rotations, rigid motions and extended poses, and their maps onskoro-coreskoroThe umbrella: re-exports the core and the tensor layer onskoro-coreskoro-uniformThe uniform distribution, on every space whose measure has finite mass onskoro-normalskoro-linearizeLinearization of a query, and a retirement's linearized replacement onskoro-normal,skoro-elimination