#[non_exhaustive]pub struct WnetConfig {
pub family: WaveletFamily,
pub mode: BoundaryMode,
pub level: Option<usize>,
pub alpha: f64,
pub lambda_grid: Option<Vec<f64>>,
pub n_lambda: usize,
pub n_folds: usize,
pub seed: u64,
pub max_iter: usize,
pub tol: f64,
}Expand description
Configuration for wnet.
The DWT parameters (family, mode, level) select the wavelet basis the
curves are transformed into (same defaults as WcrConfig: db4 / periodic /
auto-depth). alpha mixes L1 vs L2 (alpha == 1 is pure lasso, alpha == 0
is pure ridge), and the remaining fields drive the deterministic K-fold
cross-validated λ search.
Default is db4 / periodic / auto-depth, alpha == 0.5, an auto geometric
λ grid of 50 values, 5 folds, fixed seed 0, max_iter == 1000, tol == 1e-6.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.family: WaveletFamilyWavelet family for the DWT of each curve (default [WaveletFamily::Daubechies(4)]).
mode: BoundaryModeBoundary handling for the DWT (default BoundaryMode::Periodic).
level: Option<usize>Explicit decomposition depth; None (default) uses the maximum useful level.
alpha: f64Elastic-net mixing parameter ∈ [0, 1]: 1.0 is pure L1 (lasso),
0.0 is pure L2 (ridge). Default 0.5.
lambda_grid: Option<Vec<f64>>Explicit λ grid to search. None (default) auto-builds a geometric grid.
n_lambda: usizeNumber of λ values in the auto geometric grid (used when lambda_grid is
None). Default 50.
n_folds: usizeNumber of cross-validation folds. Default 5.
seed: u64Fixed RNG seed for the (deterministic) fold partition. Default 0.
max_iter: usizeMaximum coordinate-descent sweeps. Default 1000.
tol: f64Coordinate-descent convergence tolerance (max |Δβ| per sweep). Default 1e-6.
Trait Implementations§
Source§impl Clone for WnetConfig
impl Clone for WnetConfig
Source§fn clone(&self) -> WnetConfig
fn clone(&self) -> WnetConfig
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 WnetConfig
impl Debug for WnetConfig
Source§impl Default for WnetConfig
impl Default for WnetConfig
Source§impl PartialEq for WnetConfig
impl PartialEq for WnetConfig
impl StructuralPartialEq for WnetConfig
Auto Trait Implementations§
impl Freeze for WnetConfig
impl RefUnwindSafe for WnetConfig
impl Send for WnetConfig
impl Sync for WnetConfig
impl Unpin for WnetConfig
impl UnsafeUnpin for WnetConfig
impl UnwindSafe for WnetConfig
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.