pub struct EncodeQualityMetrics {
pub n_rows: usize,
pub certified_rows: usize,
pub fallback_rate: f64,
pub support_agreement: f64,
pub max_coord_abs_err: f64,
pub max_reconstruction_abs_err: f64,
pub reconstruction_ev: f64,
}Expand description
Correctness of an encode result, measured against the production CPU encode (a per-row reference) and the reconstruction it implies.
Every field is a quantity a “batched exact per-row encode” claim has to stand on: it must AGREE with the production per-row encode (support + coordinates), it must RECONSTRUCT the targets (explained variance), and it must be honest about how many rows it could not certify (fallback rate).
Fields§
§n_rows: usizeRows compared.
certified_rows: usizeRows the encode-under-test certified (h ≤ ½, exact-into-the-ball).
fallback_rate: f64Fraction of rows the encode-under-test could NOT certify and flagged for
the multi-start fallback (1 - certified_rows/n_rows). This is the
“fallback rate”.
support_agreement: f64Fraction of rows whose certificate flag AGREES with the per-row reference
encode. For a correct batched encode this is 1.0 (the batch is just the
per-row encode fanned out).
max_coord_abs_err: f64Largest absolute latent-coordinate difference between the encode-under-test
and the per-row reference encode, over all rows and coordinate dims. A
correct batched encode matches the per-row encode to round-off (≈ 0).
max_reconstruction_abs_err: f64Largest absolute element-wise reconstruction residual |x̂ − x| over the
whole batch (the “amplitude”/reconstruction error in raw output units).
reconstruction_ev: f64Reconstruction explained variance 1 − ‖X − X̂‖²_F / ‖X − X̄‖²_F, with each
output column centered by its own mean X̄. 1.0 is a perfect on-manifold
reconstruction; 0.0 is no better than the per-column mean.
Trait Implementations§
Source§impl Clone for EncodeQualityMetrics
impl Clone for EncodeQualityMetrics
Source§fn clone(&self) -> EncodeQualityMetrics
fn clone(&self) -> EncodeQualityMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EncodeQualityMetrics
Auto Trait Implementations§
impl Freeze for EncodeQualityMetrics
impl RefUnwindSafe for EncodeQualityMetrics
impl Send for EncodeQualityMetrics
impl Sync for EncodeQualityMetrics
impl Unpin for EncodeQualityMetrics
impl UnsafeUnpin for EncodeQualityMetrics
impl UnwindSafe for EncodeQualityMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more