Spaces and quantities
Every value in a model lives in a space, which fixes how it is stored, how it moves, and the typed handle code holds it by.
Everything a model holds (its uncertain quantities, its constants, and the values computed from them) lives in a space.
The space says how a value is stored in a tensor, whether it is continuous, and, when it is, how it moves: its tangent space and its retraction.
This page introduces the spaces of skoro-core, the retractions they move by, the typed handles code holds them with, and the measures that densities on them are taken against.
The spaces#
A space is a closed enumeration, dimensioned when a value is made:
crates/skoro-core/src/space.rs lines 6–20/// A quantity's type in the mathematics' sense: a closed enumeration, dimensioned at run time.
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum Space {
Real,
Vector(usize),
/// Rows and columns, stored column by column.
Matrix(usize, usize),
Positive(usize),
/// Continuous factors only: made by [`Space::product`], which refuses a discrete one.
Product(Arc<[Space]>),
/// A curved type, equal to another when their declarations' names and parameters are.
Embedded(Arc<Embedded>),
Categorical(usize),
Integer,
}The continuous spaces are the real line, vectors and matrices (a matrix stored column by column), the positive orthant of scales and rates, products of continuous spaces, and the curved types declared by later crates as embedded types.
The discrete spaces are a set of n categories, with the truth values as Categorical(2), and the integers.
Two numbers describe a space. Its storage is the number of entries a value takes in one row of a tensor; its dimension is that of its tangent space, which a discrete space does not have. For the flat spaces the two agree. They differ for a curved type, a sphere in for one, which is stored as the three coordinates of a point and moves in two dimensions.
crates/skoro-core/src/space.rs lines 50–69/// The number of entries a value takes in a row of a tensor.
pub fn storage(&self) -> usize {
match self {
Space::Real | Space::Categorical(_) | Space::Integer => 1,
Space::Vector(n) | Space::Positive(n) => *n,
Space::Matrix(m, n) => m * n,
Space::Product(factors) => factors.iter().map(Space::storage).sum(),
Space::Embedded(declaration) => declaration.storage(),
}
}
/// The dimension of the tangent space; `None` for a discrete space.
pub fn dimension(&self) -> Option<usize> {
match self {
Space::Categorical(_) | Space::Integer => None,
Space::Product(factors) => factors.iter().map(Space::dimension).sum(),
Space::Embedded(declaration) => Some(declaration.dimension()),
continuous => Some(continuous.storage()),
}
}A product is made by Space::product, which refuses a discrete factor: a product is something derivatives are taken through, and a discrete value has none.
Its blocks give each factor’s range in the product’s storage and in its tangent coordinates, which is how anything that works on a product reads one factor out of it.
How a value moves#
Derivatives, gradients and the steps an estimator takes are all read in a space’s tangent charts, which its retraction and that retraction’s inverse make. Every continuous space of the core has both, as composite operations cached per space:
crates/skoro-core/src/retraction.rs lines 1–9The retractions of the core's spaces, their inverses, and their charts' log-volumes and
domains, as composites cached per space; and the spaces' masses and uniform draws.
| space | `x ⊕ t` | `y ⊖ x` |
| --- | --- | --- |
| `Real`, `Vector`, `Matrix` | `x + reshape(t)` | `reshape(y - x)` |
| `Positive` | `positive.mul(x, positive.exp(t))` | `positive.log(y) - positive.log(x)` |
| `Product` | each factor's, on the slices of `x` and `t` by `blocks()`, concatenated | the same |
On a flat space they are addition and subtraction. On the positive orthant the retraction multiplies by the exponential of the tangent, so a tangent coordinate is a relative change and a step never leaves the space. A product retracts each factor by its own retraction, which is what the note on product manifolds shows to be a retraction of the product.
Typed handles#
Code never holds a value. It holds a handle: a node’s identifier and a marker of its type, cheap to copy and bound to no model, writer, device or precision.
crates/skoro-core/src/q.rs lines 7–22/// A marker: the static type of a handle.
pub trait Typed: Copy + Send + Sync + 'static {
/// Whether a node of `space` may be handled as this marker.
fn admits(space: &Space) -> bool;
}
/// A marker whose value fixes a space, so that a quantity can be made from it.
pub trait Declares: Typed {
fn space(&self) -> Space;
}
/// A handle on a node: an identifier and a marker, cheap to copy and bound to no writer.
pub struct Q<T> {
id: NodeId,
marker: PhantomData<fn() -> T>,
}A marker is a zero-sized type that says which spaces its handles may name: Real, Vector<N>, Matrix<M, N>, Positive<N>, Categorical<N>, Boolean and Integer, each checked at compile time, and VectorDyn, MatrixDyn, PositiveDyn, CategoricalDyn and ProductDyn, whose size is fixed by the value instead.
A marker that fixes its space (every one but ProductDyn) also Declares it, which is what lets a quantity be made from it.
Where the space is known only at run time, as when an algorithm builds nodes for whatever quantities it is given, constant_in makes a constant of the space itself:
crates/skoro-core/src/scope.rs lines 445–453/// A constant of `space` (`ValueShape` when the value does not fit it), for a space known only at
/// run time.
#[track_caller]
pub fn constant_in(space: Space, value: HostValue) -> QDyn {
let location = Location::caller();
QDyn::from_id(build(location, |draft, _| {
draft.constant(space, Some(value))
}))
}QDyn is the handle with no static type.
A handle moves between the two: untyped forgets the marker; widen turns a fixed size into a dynamic one, which cannot fail; and narrow claims a marker, checked against the node’s space when it runs, which can.
crates/skoro-core/src/q.rs lines 58–86impl<T: Typed> Q<T> {
pub(crate) fn from_id(id: NodeId) -> Q<T> {
Q {
id,
marker: PhantomData,
}
}
pub fn id(&self) -> NodeId {
self.id
}
/// Whether the operation that made this handle failed, inside a scope or for want of one.
pub fn is_failed(&self) -> bool {
self.untyped().is_failed()
}
/// The same node, with no static type.
pub fn untyped(self) -> QDyn {
QDyn { id: self.id }
}
/// The same node handled as `U`, checked against its space in the open scope
/// (`SpaceMismatch`).
#[track_caller]
pub fn narrow<U: Typed>(self) -> Q<U> {
Q::from_id(crate::scope::narrow::<U>(self.id))
}
}A handle can also be failed. Building a model never panics on a mistake such as adding a vector to a matrix: the operation returns a failed handle, and everything built on it fails in turn, as building a model describes.
Measures and chart volumes#
A density is a density with respect to a measure, and every continuous space with one says which, through its charts. The chart at carries the space’s reference measure to a density on the tangent coordinates, the chart’s volume, and its logarithm is the log-volume. A random tangent vector of density moves to a point whose log-density is at : the note on densities in tangent charts has the mathematics. The core gives each space its log-volume as a composite, beside its retraction:
crates/skoro-core/src/retraction.rs lines 10–20| space | `λ_x(t)` | `t ∈ U_x` |
| --- | --- | --- |
| `Real`, `Vector`, `Matrix` | `0` | global |
| `Positive` | `sum(positive.log(x) + t)` | global |
| `Product` | the factors', on the slices of `x` and `t`, summed | global if every factor's is; otherwise `is_nonnegative(Σ to_real(Ωᵢ) - k)` over the `k` factors that are not |
| `Embedded`, with a volume | `Λ(include(x), t)` | the declaration's, `Ω(include(x), t)` |
The log-volumes are with respect to each space's reference measure: Lebesgue measure on the
Euclidean and positive spaces, the measure an embedded type's retraction normalizes, and the
product of the factors' on a product. An embedded type that declares no volume has none, and
neither has a product with it among its factors (`NoVolume`).crates/skoro-core/src/retraction.rs lines 64–81/// The composite of `λ_x(t)`, the log-volume of the chart at `x`, of inputs this space and
/// `Vector(dimension)`, to `Real` (`NotContinuous` for a discrete space, `NoVolume` for one
/// without a measure).
pub fn log_volume(&self) -> Result<Arc<Composite>, Error> {
self.measured()?;
cached(self, Map::LogVolume)
}
/// Whether every chart of this space is global, and otherwise the composite of `t ∈ U_x`, of
/// inputs this space and `Vector(dimension)`, to `Boolean` (errors as `log_volume`'s).
pub fn domain(&self) -> Result<Domain, Error> {
self.measured()?;
if self.is_global() {
Ok(Domain::Global)
} else {
cached(self, Map::Domain).map(Domain::Within)
}
}On the Euclidean spaces the chart is a translation and its log-volume is zero.
On the positive orthant it is , the logarithm of the moved point’s coordinates, which is why a density written in the logarithmic chart of a scale carries the familiar .
On a product it is the sum of the factors’.
A discrete space has counting measure and no chart.
On a handle, x.log_volume(t) is , so that a density through the chart at mu is written
let t = x.local(mu);
let log_density = gaussian(t) - mu.log_volume(t);Whether depends on the point at all is a property of the space, read off its structure rather than its numbers: on an embedded type, from whether its declared log-volume’s composite reads its first input, by Composite::reads.
Where it does not, as on the rotations and the spheres, a log-volume written through the chart at a mean is a function of the tangent alone, which is what lets the linearization fold it into its rows.
crates/skoro-core/src/retraction.rs lines 172–196/// Whether `λ_x(t)` depends on the point `x`: false on the Euclidean spaces, whose log-volume
/// is zero, true on `Positive`, the factors' on a product (true if any factor's is), and on
/// an embedded type whether its declared `Λ` reads its first input (`NotContinuous` for a
/// discrete space, `NoVolume` for one without a measure).
pub fn volume_reads_point(&self) -> Result<bool, Error> {
self.measured()?;
Ok(match self {
Space::Real | Space::Vector(_) | Space::Matrix(..) => false,
Space::Positive(_) => true,
Space::Product(factors) => {
let mut reads = false;
for factor in factors.iter() {
reads |= factor.volume_reads_point()?;
}
reads
}
Space::Embedded(declaration) => match declaration.volume() {
Some(volume) => volume.log_volume().reads(0),
None => unreachable!("measured() refuses a type without a volume"),
},
Space::Categorical(_) | Space::Integer => {
unreachable!("measured() refuses a discrete space")
}
})
}Embedded types. A curved type has no Lebesgue measure. It may declare its chart’s volume, against the measure its retraction normalizes, the one whose charts have volume at their centre: Haar measure on a group, surface measure on a sphere, the same however the type is stored, and for a type stored up to a group, the measure on its points.
crates/skoro-core/src/embedded.rs lines 117–135/// A chart's declared volume: its log-volume `Λ` and its domain, against the measure the
/// type's retraction normalizes. Declaring one says that the chart is full: its image is the
/// whole type but a set of measure zero.
#[derive(Clone, Debug)]
pub struct Volume {
log_volume: Arc<Composite>,
domain: Domain,
}
/// Where a chart is a diffeomorphism onto its full image.
#[derive(Clone, Debug)]
pub enum Domain {
/// `U_μ = ℝ^d` at every point.
Global,
/// The composite of `t ∈ U_μ`, to `Boolean`. On a declaration it takes `Vector(n)` and
/// `Vector(d)`, the point's storage and the tangent; from `Space::domain()`, the point itself
/// and the tangent.
Within(Arc<Composite>),
}crates/skoro-core/src/embedded.rs lines 328–332/// This declaration, with its chart's volume against the measure its retraction normalizes.
/// Refuses a log-volume not of `Vector(n)` and `Vector(d)` to `Real`, a domain not of the
/// same to `Boolean`, a declaration that already has a volume, and a flat one, whose volume
/// is the core's (`InvalidDeclaration`).
pub fn with_volume(self: Arc<Self>, volume: Volume) -> Result<Arc<Embedded>, Error> {The log-volume is an operation on the point’s storage and the tangent, written as a composite, smooth as computed at , and its derivatives are its parts’.
The domain is where the chart is a diffeomorphism: all of , or where a composite to Boolean says, such as the ball of radius for an exponential chart.
A declaration asks one more thing of the type’s inverse retraction: that it invert the chart on all of the chart’s image, not only near its centre.
The sphere of the core’s tests declares its stereographic chart’s volume so:
crates/skoro/tests/common/sphere.rs lines 78–88/// `Λ(x, t) = -2 log(1 + |t|² / 4)`, against surface measure, which the orthonormal basis
/// normalizes: the chart is global and full.
pub fn log_volume() -> Arc<Composite> {
Composite::define(
"sphere.log_volume",
Vec::new(),
&[Space::Vector(3), Space::Vector(2)],
|q| ((q[1] * q[1]).sum() * 0.25 + 1.0).log() * -2.0,
)
.unwrap()
}crates/skoro/tests/common/sphere.rs lines 104–110pub static SPHERE: LazyLock<Arc<Embedded>> = LazyLock::new(|| {
let (r, q, p) = (retraction(), inverse(), projection());
Embedded::declare("sphere", Vec::new(), 3, 2, r, q, Some(p))
.and_then(|sphere| sphere.with_volume(Volume::global(log_volume())))
.and_then(|sphere| sphere.with_mass(mass()))
.unwrap()
});testing::check_volume holds a declaration to the area formula of the note, computed from first-order passes over the retraction, and checks that the volume is at the centre and that the inverse holds across the domain.
A space without a measure. An embedded type that declares no volume has none, and neither does a product with it among its factors; has_measure says so.
Such a space has no densities: no term may score a quantity of it, no proposal may draw it, and no retirement may integrate it out, each refused with NoVolume.
It may still be conditioned on, observed, and estimated by optimization, and a measurement of it is held as a likelihood factor over the measured value.
Masses and uniform points#
A reference measure may have finite mass , and then the space has a uniform distribution, . A categorical space has it without declaring anything: its counting measure has mass . The Euclidean spaces, the positive orthant and the integers have infinite mass. An embedded type of finite mass says so as one more step of its declaration, with the logarithm of its mass and a uniform draw, a map from as many variates in as it has dimensions to the storage of one point:
crates/skoro-core/src/embedded.rs lines 164–195
/// A uniform point of a type from variates: `variates`, as many as the type has dimensions, each
/// in (0, 1), to `point`, the storage of one point. It carries Lebesgue measure on the cube to
/// the type's reference measure divided by its mass.
pub type UniformDraw = fn(variates: &[f64], point: &mut [f64]);
/// The mass of a type's reference measure, finite, and how a uniform point is drawn: what a type
/// declares to have a uniform distribution.
///
/// The draw is a function of the host and not a composite: no parameter reaches it, so no pass
/// crosses it, and every sampler draws on the host in double precision.
#[derive(Clone, Copy, Debug)]
pub struct Mass {
log_mass: f64,
draw: UniformDraw,
}
impl Mass {
/// The mass whose logarithm is `log_mass`, and the draw of a uniform point.
pub fn new(log_mass: f64, draw: UniformDraw) -> Mass {
Mass { log_mass, draw }
}
/// `log ν(𝕏)`.
pub fn log_mass(&self) -> f64 {
self.log_mass
}
pub fn draw(&self) -> UniformDraw {
self.draw
}
}crates/skoro-core/src/embedded.rs lines 367–397/// This declaration, with the mass of the measure its volume is against. Refuses a
/// declaration without a volume, whose measure is not fixed, a flat one, one that already
/// declares a mass, and a log-mass that is not finite (`InvalidDeclaration`).
pub fn with_mass(self: Arc<Self>, mass: Mass) -> Result<Arc<Embedded>, Error> {
let invalid = |reason: &str| Error::InvalidDeclaration {
name: self.name.to_string(),
reason: reason.to_string(),
};
if self.flat {
return Err(invalid("a flat type's measure has infinite mass"));
}
if self.volume.is_none() {
return Err(invalid(
"it declares no volume, so the measure of its mass is not fixed",
));
}
if self.mass.is_some() {
return Err(invalid("it already declares a mass"));
}
if !mass.log_mass.is_finite() {
return Err(invalid("its log-mass is not finite"));
}
let mut declaration = Arc::unwrap_or_clone(self);
declaration.mass = Some(mass);
Ok(Arc::new(declaration))
}
/// The mass, when the type declares one.
pub fn mass(&self) -> Option<&Mass> {
self.mass.as_ref()
}The mass is of the measure the declared volume is against, so a type declares its volume first. The draw is a function on the host and not a composite: no parameter reaches it, so no pass ever crosses it, and every sampler draws on the host in double precision. A space answers for its mass, and draws a uniform point, a product by its factors, each from the variates of its tangent range into its storage range:
crates/skoro-core/src/retraction.rs lines 83–130/// `log ν(𝕏)`: `log n` for `Categorical(n)`, the declared log-mass of an embedded type, and
/// the sum of the factors' for a product. Every other space has infinite mass or declares
/// none, and `Categorical(0)` has no point to give a law to (`NoMass`, naming this space).
pub fn log_mass(&self) -> Result<f64, Error> {
let no_mass = || Error::NoMass {
space: self.clone(),
};
match self {
Space::Categorical(n) if *n > 0 => Ok((*n as f64).ln()),
Space::Embedded(declaration) => declaration
.mass()
.map(|mass| mass.log_mass())
.ok_or_else(no_mass),
Space::Product(factors) => factors
.iter()
.map(|factor| factor.log_mass().map_err(|_| no_mass()))
.sum(),
_ => Err(no_mass()),
}
}
/// A uniform point of a continuous space of finite mass, from `dimension` variates, each in
/// (0, 1), into `point`, the storage of one point: an embedded type by its declared draw, a
/// product factor by factor, each from the variates of its tangent range into its storage
/// range (`NoMass` otherwise, a categorical space included, whose value is not a point of
/// storage).
pub fn draw_uniform(&self, variates: &[f64], point: &mut [f64]) -> Result<(), Error> {
let no_mass = || Error::NoMass {
space: self.clone(),
};
match self {
Space::Embedded(declaration) => {
let mass = declaration.mass().ok_or_else(no_mass)?;
(mass.draw())(variates, point);
Ok(())
}
Space::Product(_) => {
for block in self.blocks() {
block
.space
.draw_uniform(&variates[block.tangent], &mut point[block.storage])
.map_err(|_| no_mass())?;
}
Ok(())
}
_ => Err(no_mass()),
}
}Every other space has no mass to give, and says so with NoMass.
The test sphere declares the mass of surface measure, , with Archimedes’ draw, a uniform height and a uniform longitude:
crates/skoro/tests/common/sphere.rs lines 90–102/// A uniform point of the sphere from two variates, by Archimedes: the height `c = 1 - 2u₁` is
/// uniform on `(-1, 1)` and the longitude `φ = 2πu₂` on the circle, to
/// `(√(1 - c²) cos φ, √(1 - c²) sin φ, c)`.
pub fn uniform_point(u: &[f64], x: &mut [f64]) {
let c = 1.0 - 2.0 * u[0];
let (s, phi) = ((1.0 - c * c).sqrt(), std::f64::consts::TAU * u[1]);
(x[0], x[1], x[2]) = (s * phi.cos(), s * phi.sin(), c);
}
/// The mass of surface measure on the sphere, `4π`, and Archimedes' draw.
pub fn mass() -> Mass {
Mass::new((4.0 * std::f64::consts::PI).ln(), uniform_point)
}testing::check_mass holds a declaration to one identity that binds its draw, its volume and its mass together.
By the note on the uniform distribution, the chart coordinate of a uniform point has the density on the chart’s domain, so over uniform draws the mean of , with the standard normal density, is the normal’s mass of the domain over .
A draw that is not uniform, a volume wrong away from the centre or a wrong mass each break it:
crates/skoro-core/src/testing.rs lines 982–1003/// The check a crate runs on its declaration's mass, at the points given, one per row, on the
/// manifold, after `check_volume`:
///
/// - a draw from each of 65 536 keys is finite and on the type: `R(x, 0) = x` up to the group
/// the type is stored up to;
/// - at each point `μ` given, with `t = Q(μ, x)` over the draws `x` and `φ` the standard normal
/// density of `ℝ^d`, the mean of `φ(t) e^{-Λ(μ, t)}` times the mass is 1 to within four of its
/// standard errors, estimated from the same draws. A domain, when one is declared, is where
/// every `t` must lie, and the mean is then compared with the normal's mass of the domain,
/// which the caller gives as `normal_mass_of_domain`: 1 on a global chart.
///
/// The second is one identity of the draw, the volume and the mass together: the coordinate `t`
/// of a uniform point has the density `e^Λ / ν(𝕏)` on the domain `U_μ`, so the mean is
/// `∫_{U_μ} φ / ν(𝕏)`. The keys are fixed, so the check gives the same answer on every run, and
/// it runs on the host in double precision, as the draws do.
///
/// A failure names the check and the point's row.
pub fn check_mass(
declaration: &Arc<Embedded>,
points: &HostValue,
normal_mass_of_domain: f64,
) -> Result<(), String> {The rotations declare their mass, (Rotations and rigid motions), and the uniform distribution is the law it gives them.
Types stored up to a group#
Some types cannot be stored as a submanifold of their storage. A rotation stored as a unit quaternion is stored twice, at and at , so the rotations are not a set of quaternions but the quaternions taken up to their sign. An embedded type may declare such a storage: the finite group of maps of its storage that carry a stored point to another storage of the same point, given by its generators, each a signed permutation of the storage’s entries:
crates/skoro-core/src/embedded.rs lines 47–56/// A signed permutation of a type's storage: entry `i` of `g x` is `signs[i] · x[source[i]]`.
///
/// The maps a type is stored up to: a group of them composes exactly, so that its closure under
/// composition ends, and each is a linear map of the storage, as the group of a type stored up
/// to one must be.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Linear {
source: Vec<usize>,
signs: Vec<i8>,
}crates/skoro-core/src/embedded.rs lines 399–429/// This declaration, stored up to the finite group `generators` generate: a point of the
/// type is the orbit of a stored point, `R`, `Q`, `P` and `Λ` must meet the conditions of a
/// type stored up to a group, which `check_embedded` and `check_volume` check, and every
/// function the core computes is then the same at every representative. Refuses no
/// generators, a generator of another storage, a group of more than 64 elements, which the
/// comparisons up to the group would enumerate, a flat declaration, and one already stored
/// up to a group (`InvalidDeclaration`).
pub fn stored_up_to(self: Arc<Self>, generators: Vec<Linear>) -> Result<Arc<Embedded>, Error> {
let invalid = |reason: &str| Error::InvalidDeclaration {
name: self.name.to_string(),
reason: reason.to_string(),
};
if self.flat {
return Err(invalid("a flat type is stored as itself"));
}
if !self.identification.is_empty() {
return Err(invalid("it is already stored up to a group"));
}
if generators.is_empty() {
return Err(invalid("a group needs a generator"));
}
if generators.iter().any(|g| g.storage() != self.storage) {
return Err(invalid("a generator is of another storage"));
}
if closure(self.storage, &generators).is_none() {
return Err(invalid("its group has more than 64 elements"));
}
let mut declaration = Arc::unwrap_or_clone(self);
declaration.identification = generators;
Ok(Arc::new(declaration))
}A point of such a type is the set of its stored values, and the type’s charts are read on the points. The retraction must carry the group, , so that a step from either representative reaches the same point; the inverse must not see it, , so that a tangent coordinate is a property of the points; the projection must carry it as the retraction does; and a declared log-volume must not see it either. Then every function the core computes from a quantity of the type, its densities, its gradients and Hessians in the charts, its steps, is the same at every representative, and none of the core’s derivatives changes, since they are taken at the stored value as before (the note on quotients by a finite group proves it, and the note on densities in tangent charts carries the measure and the volume to the points). A declared chart is global and full when it is so on the points: the Cayley chart of the rotations reaches only the quaternions on the side of its base point, but every rotation but the half-turns.
testing::check_embedded and check_volume check each condition for each generator, and that no generator fixes a stored point; testing::close_up_to compares two stored values as points, up to the group.
What the core cannot check is a map a model writes on the inclusion, which reads the stored value itself: it is a map of the points only if it gives the same at every representative, and a type’s maps say which they are.
How this came to be
The development behind this page, newest first:
- Least squares, motivated from MAP estimation and trust regions Done This entry reordered the mathematics' part on least squares and Gaussian approximations so that it begins with the estimate sought and ends with the linear algebra that computes it. Five notes are…
- The uniform distribution on compact types, and broad scales of a normal on a curved type Done A broad normal on a rotation is not a weak prior. Under the Cayley chart a tangent of length is a turn by , and once the standard deviation of the normal passes one radian its mean…
- The Mathematics section, read start to finish Done The Mathematics section was a collection of notes, one idea to a note, linked by what each builds on, while most of the mathematics the pages relied on sat in the archive's frozen documents, argued in…
- Observed quaternions of arbitrary sign on outside data Done The rotations, the rigid motions and the extended poses were declared as the unit quaternions and their products, with the stereographic chart, which tells from : an observed quaternion had to…
- Free the constants a retirement leaves with no consumer Done A retirement removed the retired quantities and every node computed from them, but never a constant, or a value folded from constants, since those are computed from no quantity: the scales, the…
- Linearization and elimination Done This entry brought back the two pieces every least-squares method rests on, as two crates. skoro-elimination is the note on elimination in square-root form as code: factored problems over blocks of…
- Reference measures and chart volumes of spaces Done Every continuous space of the core now has a reference measure, given through the log-volume of its retraction's chart, and the core's appendix no longer leaves curved types without one…
- The core Done The core of skoro, built to the charter: three crates in which a model can be built, queried and differentiated, but no distribution exists yet. skoro-tensor is the layer over burn, whose tensors are…
Built on by
- Operations and their derivatives Maps between spaces described once and on no device, lowered to kernels that say how far they differentiate, and composed from a few primitives.
- The normal distribution skoro's normal is the law of a point moved by normal noise through its space's chart, on every space whose chart is global, with an exact density and sampler, a scale in four forms, roles that estimators read, its tangent among them, and the Gaussian and improper Gaussian replacements of a retirement.
- Rotations and rigid motions The crate skoro-spatial declares the rotations, the rigid motions and the extended poses as embedded types stored as quaternions up to sign, with the Cayley chart, global on each group, and declared volumes, so that they carry the normal in whatever sign their quaternions are given, and writes their maps as composites whose derivatives are the core's.
- The uniform distribution skoro's uniform distribution is the law of a space whose reference measure has finite mass, the rotations and the categorical spaces among them, with a constant term, an exact sampler on the host, and a residual of no components, so that a linearization reads it as a factor with no rows; it is how a model says that nothing is known of a quantity.