pub struct SpmConfig {
pub ncomp: usize,
pub alpha: f64,
pub tuning_fraction: f64,
pub seed: u64,
}Expand description
Configuration for SPM chart construction.
Fields§
§ncomp: usizeNumber of principal components to retain (default 5).
Typical range: 3–10. Use select_ncomp()
for data-driven selection. More components capture finer structure but
increase dimensionality of the monitoring statistic.
alpha: f64Significance level for control limits (default 0.05).
tuning_fraction: f64Fraction of data used for tuning/FPCA (default 0.5).
The remainder forms the calibration set for control limits. Default 0.5 balances FPCA estimation quality against control limit precision. With small datasets (n < 50), consider 0.6–0.7 to ensure adequate FPCA estimation.
The tuning/calibration split induces a bias-variance trade-off: a larger tuning fraction yields better FPCA eigenfunction estimates but less precise control limits. The optimal split depends on the eigenvalue decay rate — fast decay (smooth processes) favors allocating more data to calibration, while slow decay (rough processes) favors more tuning data for stable FPCA estimation.
seed: u64Random seed for data splitting (default 42).
Trait Implementations§
impl StructuralPartialEq for SpmConfig
Auto Trait Implementations§
impl Freeze for SpmConfig
impl RefUnwindSafe for SpmConfig
impl Send for SpmConfig
impl Sync for SpmConfig
impl Unpin for SpmConfig
impl UnsafeUnpin for SpmConfig
impl UnwindSafe for SpmConfig
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
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
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.