pub struct RandomEffectTermSpec {
pub name: String,
pub feature_col: usize,
pub drop_first_level: bool,
pub penalized: bool,
pub frozen_levels: Option<Vec<u64>>,
}Expand description
Random-effects term specification.
The selected feature column is interpreted as a categorical grouping variable. The term contributes a one-hot dummy block with an identity penalty on group coefficients, equivalent to i.i.d. Gaussian random effects.
Fields§
§name: String§feature_col: usize§drop_first_level: boolIf true, drop the lexicographically first group level to use treatment coding. If false, keep all levels (full one-hot block, still identifiable under ridge).
penalized: boolIf true, add a ridge penalty and estimate this block as a random effect. If false, leave the one-hot/treatment-coded block unpenalized so it is a fixed categorical main effect. The default preserves older saved models.
frozen_levels: Option<Vec<u64>>Optional fixed kept-level set (sorted by f64 bit pattern) captured at fit time. When present, prediction uses exactly these columns to avoid design drift.
Trait Implementations§
Source§impl Clone for RandomEffectTermSpec
impl Clone for RandomEffectTermSpec
Source§fn clone(&self) -> RandomEffectTermSpec
fn clone(&self) -> RandomEffectTermSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RandomEffectTermSpec
impl Debug for RandomEffectTermSpec
Source§impl<'de> Deserialize<'de> for RandomEffectTermSpec
impl<'de> Deserialize<'de> for RandomEffectTermSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RandomEffectTermSpec
impl RefUnwindSafe for RandomEffectTermSpec
impl Send for RandomEffectTermSpec
impl Sync for RandomEffectTermSpec
impl Unpin for RandomEffectTermSpec
impl UnsafeUnpin for RandomEffectTermSpec
impl UnwindSafe for RandomEffectTermSpec
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.