pub struct GateBlock<'a> {
pub design: ArrayView2<'a, f64>,
pub y: ArrayView1<'a, f64>,
pub b: ArrayView1<'a, f64>,
pub offset: Option<ArrayView1<'a, f64>>,
pub psi_hat: Option<ArrayView1<'a, f64>>,
pub penalty: Option<ArrayView2<'a, f64>>,
pub hess_rest: Option<ArrayView2<'a, f64>>,
pub h_rest: Option<ArrayView1<'a, f64>>,
}Expand description
The data of one logit gate block to be evidence-integrated.
All matrices are in the gate coordinates g (dimension d_g). The
h_rest / hess_rest blocks carry whatever the surrounding arrow Schur
system contributes to the gate coordinates from the rest of the model
(decoder/coordinate cross-terms already Schur-folded in); pass zeros when the
gate block is isolated.
Fields§
§design: ArrayView2<'a, f64>Gate design X_g, shape (n, d_g): row i is x_i with ψ_i = x_iᵀγ + o_i.
y: ArrayView1<'a, f64>Binomial responses y_i (counts; 0..=b_i).
b: ArrayView1<'a, f64>Binomial shapes b_i (1.0 for Bernoulli).
offset: Option<ArrayView1<'a, f64>>Per-row offset o_i (the fixed part of the gate logit). Empty ⇒ zeros.
psi_hat: Option<ArrayView1<'a, f64>>Current gate linear predictor ψ̂_i used to tilt the PG law (the inner
optimum’s logits). Empty ⇒ the untilted PG(b, 0) rule.
penalty: Option<ArrayView2<'a, f64>>Penalty S_g on the gate coordinates (d_g × d_g, SPD-or-PSD). Empty ⇒ zero.
hess_rest: Option<ArrayView2<'a, f64>>Rest-of-model Hessian contribution to the gate coordinates H_rest,gg
(d_g × d_g). Empty ⇒ zero.
h_rest: Option<ArrayView1<'a, f64>>Rest-of-model linear contribution h_rest,g (length d_g). Empty ⇒ zero.
Auto Trait Implementations§
impl<'a> Freeze for GateBlock<'a>
impl<'a> RefUnwindSafe for GateBlock<'a>
impl<'a> Send for GateBlock<'a>
impl<'a> Sync for GateBlock<'a>
impl<'a> Unpin for GateBlock<'a>
impl<'a> UnsafeUnpin for GateBlock<'a>
impl<'a> UnwindSafe for GateBlock<'a>
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> 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.