pub struct BayesianConfig {
pub ncomp: usize,
pub tau2: f64,
pub ig_a0: f64,
pub ig_b0: f64,
pub n_iter: usize,
pub burn_in: usize,
pub thin: usize,
pub seed: u64,
}Expand description
Configuration for the Bayesian FOSR Gibbs sampler (REG-06-04).
Uses conjugate Normal-Inverse-Gamma priors. Defaults match the weakly-informative
settings recommended by Jiang et al. (2025): τ² = 100, IG(0.001, 0.001).
Divergence from refund: refund’s Bayesian FOSR uses spline basis priors;
this implementation uses FPCA score compression via fdata_to_pc_1d for
simplicity and zero new dependencies.
Fields§
§ncomp: usizeNumber of FPC components for score compression (must be ≥ 1).
tau2: f64Prior variance τ² on FPC-space coefficients (default: 100.0).
Large τ² gives a weakly informative prior; very small values are dogmatic.
ig_a0: f64Inverse-Gamma prior shape a₀ (default: 0.001 — weakly informative).
ig_b0: f64Inverse-Gamma prior rate b₀ (default: 0.001 — weakly informative).
n_iter: usizeNumber of Gibbs iterations retained after burn-in (must be ≥ 1).
burn_in: usizeBurn-in iterations discarded (must be < n_iter iterations will run).
thin: usizeThinning interval — keep every thin-th draw (must be ≥ 1).
seed: u64RNG seed — chain is fully deterministic: StdRng::seed_from_u64(seed).
Trait Implementations§
Source§impl Clone for BayesianConfig
impl Clone for BayesianConfig
Source§fn clone(&self) -> BayesianConfig
fn clone(&self) -> BayesianConfig
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 BayesianConfig
impl Debug for BayesianConfig
Source§impl PartialEq for BayesianConfig
impl PartialEq for BayesianConfig
impl StructuralPartialEq for BayesianConfig
Auto Trait Implementations§
impl Freeze for BayesianConfig
impl RefUnwindSafe for BayesianConfig
impl Send for BayesianConfig
impl Sync for BayesianConfig
impl Unpin for BayesianConfig
impl UnsafeUnpin for BayesianConfig
impl UnwindSafe for BayesianConfig
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> 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,
impl<T> Scalar for T
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.