pub struct DeflationSpec {
pub basis: Vec<Array1<f64>>,
}Expand description
Top-subspace (Hutch++) deflation configuration for the surrogate. When a plan
carries one, RationalLogdetPlan::evaluate peels an r-dimensional
orthonormal subspace Q of the heavy (top) directions from the operator and
splits the log-determinant by the EXACT identity (no invariance assumed)
tr log(S/c) = tr(Qᵀ log(S/c) Q) + tr(P log(S/c) P), P = I − QQᵀ,
evaluating the first block deterministically over the r basis columns and
the second by Hutchinson over the PROJECTED probes u_j = P v_j (each with
its own reference norm ‖u_j‖², so the k − r bookkeeping is automatic).
The Hutchinson variance then rides only on the off-diagonal mass of
P log(S/c) P — small once Q captures the heavy directions — collapsing the
error bar that raw probes carry on a wide spectrum. The decomposition is
EXACT for ANY orthonormal Q; the subspace iteration only steers Q toward
the top space to reduce variance, it can never bias the estimate.
The basis is FROZEN here (built once by RationalLogdetPlan::with_deflation
from the operator at the plan’s ρ), NOT rebuilt per evaluation. This is what
keeps value and gradient the SAME functional: with the estimated term2, the
sum term1 + term2 is Q-dependent, so a Q that moved with ρ would put an
un-modelled ∂Q/∂ρ term in the true gradient. A frozen Q makes the
fixed-Q directional derivative EXACT for the surrogate, at the cost of Q
going slightly stale as the line search moves ρ (which only relaxes the
variance reduction — never biases the value, since the decomposition is exact
for any fixed orthonormal Q).
Fields§
§basis: Vec<Array1<f64>>Frozen orthonormal top-subspace basis Q (columns q_i), built once from
the operator. Reused verbatim across every ρ evaluation (CRN).
Trait Implementations§
Source§impl Clone for DeflationSpec
impl Clone for DeflationSpec
Source§fn clone(&self) -> DeflationSpec
fn clone(&self) -> DeflationSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DeflationSpec
impl RefUnwindSafe for DeflationSpec
impl Send for DeflationSpec
impl Sync for DeflationSpec
impl Unpin for DeflationSpec
impl UnsafeUnpin for DeflationSpec
impl UnwindSafe for DeflationSpec
Blanket Implementations§
impl<T> Allocation for T
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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,
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.