pub struct AtomLinearImage {
pub atom_idx: usize,
pub t_bar: f64,
pub b0: Array1<f64>,
pub b1: Array1<f64>,
pub row_codes: Option<Array1<f64>>,
}Expand description
The fitted straight sub-model γ̃(t) = b₀ + (t − t̄)·b₁ of one d = 1 atom:
the exact assignment-mass-weighted least-squares line fit to the atom’s
leave-this-atom-out RESPONSE residual y_resp over its assigned rows (the
curved family’s nested Θ = 0 sub-model on common data, #1202). Carried on a
verdict that selects LINEAR so the collapsed reconstruction can replace the
curved decoded row with this straight image at any coordinate WITHOUT
re-entering the (broken, #1051) outer fit — the coefficients are already
realized inside the adjudication.
Fields§
§atom_idx: usizeThe atom’s slot index in the dictionary (so the collapsed assembly knows which atom’s decoded row to substitute).
t_bar: f64The mass-weighted coordinate mean t̄ the line is centered on.
b0: Array1<f64>Per-output-channel centered intercept b₀ = γ̄ at t̄ (length p).
b1: Array1<f64>Per-output-channel slope b₁ (length p).
row_codes: Option<Array1<f64>>#1026 collapse-rescue per-row coordinates. None for the ordinary path:
the line is evaluated at the atom’s OWN realized coordinate t. Some(u)
only when the atom’s circle codes had collapsed to a single point
(s_tt ≈ 0) so its own coordinate carries no spread — then the line is fit
against, and reconstruct evaluates it at, these FRESH per-row codes uᵢ
(the projection of the leave-this-atom-out residual onto its top
mass-weighted output direction). This is what lets a circle atom that the
joint fit drove into the degenerate “chord-through-the-arc” fixed point
still reconstruct its residual’s best linear direction — recovering the
linear-tail reach the hybrid-split was designed to deliver — instead of a
constant (its collapsed curve), which is the real-OLMo rank-1 co-collapse
(held-out EV ≈ 0.13 vs the linear ceiling ≈ 0.74). Length n (one per
reconstructed row); unassigned rows are gated to zero by a_k anyway.
Implementations§
Source§impl AtomLinearImage
impl AtomLinearImage
Sourcepub fn fill_row(&self, t: f64, out: &mut [f64])
pub fn fill_row(&self, t: f64, out: &mut [f64])
Evaluate the straight sub-model b₀ + (t − t̄)·b₁ into out (length p).
Sourcepub fn coordinate_for_row(&self, row: usize, own_t: f64) -> f64
pub fn coordinate_for_row(&self, row: usize, own_t: f64) -> f64
The coordinate at which row row should evaluate this image: the
collapse-rescue fresh code uᵢ when present (#1026), else the atom’s own
realized coordinate own_t passed by the caller.
Trait Implementations§
Source§impl Clone for AtomLinearImage
impl Clone for AtomLinearImage
Source§fn clone(&self) -> AtomLinearImage
fn clone(&self) -> AtomLinearImage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AtomLinearImage
impl RefUnwindSafe for AtomLinearImage
impl Send for AtomLinearImage
impl Sync for AtomLinearImage
impl Unpin for AtomLinearImage
impl UnsafeUnpin for AtomLinearImage
impl UnwindSafe for AtomLinearImage
Blanket Implementations§
impl<T> Allocation for T
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.