pub struct CorrectionFit { /* private fields */ }Expand description
A fitted correction: coefficients, bootstrap replicates and the split.
Implementations§
Source§impl CorrectionFit
impl CorrectionFit
Sourcepub fn span_ev(&self) -> (f64, f64)
pub fn span_ev(&self) -> (f64, f64)
Energy span (lowest, highest) of the training points, eV; the
correction applies inside it only (both ends included).
Sourcepub fn coefficients(&self) -> &[f64]
pub fn coefficients(&self) -> &[f64]
Chebyshev coefficients c_0..=c_d of ln g.
Sourcepub fn settings(&self) -> FitSettings
pub fn settings(&self) -> FitSettings
The settings the fit was made with (including the seed).
Sourcepub fn train_indices(&self) -> &[usize]
pub fn train_indices(&self) -> &[usize]
Dataset indices of the training points, ascending.
Sourcepub fn held_out_indices(&self) -> &[usize]
pub fn held_out_indices(&self) -> &[usize]
Dataset indices of the held-out points, ascending.
Sourcepub fn weighted(&self) -> bool
pub fn weighted(&self) -> bool
True if the fit used weights 1 / (sigma / S)^2, which requires every
training point to state an uncertainty; otherwise it is unweighted.
Sourcepub fn failed_replicates(&self) -> usize
pub fn failed_replicates(&self) -> usize
Bootstrap resamples discarded because their fit was singular.
Sourcepub fn n_replicates(&self) -> usize
pub fn n_replicates(&self) -> usize
Number of bootstrap replicates kept.
Sourcepub fn held_out_report(&self) -> &HeldOutReport
pub fn held_out_report(&self) -> &HeldOutReport
Residuals of the base and corrected model on the held-out points.
Sourcepub fn train_base(&self) -> ResidualStats
pub fn train_base(&self) -> ResidualStats
Residual statistics of the base model on the training points.
Sourcepub fn train_corrected(&self) -> ResidualStats
pub fn train_corrected(&self) -> ResidualStats
Residual statistics of the corrected model on the training points.
Sourcepub fn in_span(&self, energy_ev: f64) -> bool
pub fn in_span(&self, energy_ev: f64) -> bool
True if energy_ev is inside the span the correction applies to.
Trait Implementations§
Source§impl Clone for CorrectionFit
impl Clone for CorrectionFit
Source§fn clone(&self) -> CorrectionFit
fn clone(&self) -> CorrectionFit
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 CorrectionFit
impl Debug for CorrectionFit
Source§impl PartialEq for CorrectionFit
impl PartialEq for CorrectionFit
impl StructuralPartialEq for CorrectionFit
Auto Trait Implementations§
impl Freeze for CorrectionFit
impl RefUnwindSafe for CorrectionFit
impl Send for CorrectionFit
impl Sync for CorrectionFit
impl Unpin for CorrectionFit
impl UnsafeUnpin for CorrectionFit
impl UnwindSafe for CorrectionFit
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 more