pub struct AffineRemlProfile<'a> { /* private fields */ }Expand description
Spectral REML/profile score with affine diagonal modes
h_i(lambda) = g_i + lambda s_i.
projected_rhs_squared is RESPONSE-MAJOR: entry (d, i) is stored at
d * n_modes + i. The score is
-1/2 { D [logdet_constant + sum log h_i - rank log(lambda)] + residual_dof * sum_d log(R_d / residual_dof) },
where R_d = response_energy[d] - sum_i q[d,i] / h_i.
Implementations§
Source§impl<'a> AffineRemlProfile<'a>
impl<'a> AffineRemlProfile<'a>
pub fn new( gram_modes: &'a [f64], penalty_modes: &'a [f64], projected_rhs_squared: &'a [f64], response_energy: &'a [f64], residual_dof: f64, determinant_rank: usize, logdet_constant: f64, ) -> Result<Self, AffineRemlError>
pub fn num_modes(&self) -> usize
pub fn num_responses(&self) -> usize
Sourcepub fn evaluate(&self, log_lambda: f64) -> Result<ScoreJet, AffineRemlError>
pub fn evaluate(&self, log_lambda: f64) -> Result<ScoreJet, AffineRemlError>
Exact score value, first derivative, and second derivative in
log(lambda).
Sourcepub fn enclose(
&self,
lo: f64,
hi: f64,
) -> Result<DerivativeEnclosure, AffineRemlError>
pub fn enclose( &self, lo: f64, hi: f64, ) -> Result<DerivativeEnclosure, AffineRemlError>
Outward enclosure of the first two score derivatives on a bounded log-lambda interval.
pub fn maximize( &self, lo: f64, hi: f64, resolution: f64, ) -> Result<ScoreSearchResult, ScoreSearchError<AffineRemlError>>
Trait Implementations§
Source§impl<'a> Clone for AffineRemlProfile<'a>
impl<'a> Clone for AffineRemlProfile<'a>
Source§fn clone(&self) -> AffineRemlProfile<'a>
fn clone(&self) -> AffineRemlProfile<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for AffineRemlProfile<'a>
Auto Trait Implementations§
impl<'a> Freeze for AffineRemlProfile<'a>
impl<'a> RefUnwindSafe for AffineRemlProfile<'a>
impl<'a> Send for AffineRemlProfile<'a>
impl<'a> Sync for AffineRemlProfile<'a>
impl<'a> Unpin for AffineRemlProfile<'a>
impl<'a> UnsafeUnpin for AffineRemlProfile<'a>
impl<'a> UnwindSafe for AffineRemlProfile<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.