pub struct TuckerDecomposition {
pub core: DenseTensor,
pub u0: Vec<Vec<f64>>,
pub u1: Vec<Vec<f64>>,
pub u2: Vec<Vec<f64>>,
}Expand description
Tucker decomposition result for a 3-way tensor.
T ≈ G ×₁ U₀ ×₂ U₁ ×₃ U₂ where G is the core tensor (r0×r1×r2).
Fields§
§core: DenseTensorCore tensor of shape (r0, r1, r2).
u0: Vec<Vec<f64>>Mode-0 factor matrix (n0×r0).
u1: Vec<Vec<f64>>Mode-1 factor matrix (n1×r1).
u2: Vec<Vec<f64>>Mode-2 factor matrix (n2×r2).
Implementations§
Source§impl TuckerDecomposition
impl TuckerDecomposition
Sourcepub fn reconstruction_norm(&self) -> f64
pub fn reconstruction_norm(&self) -> f64
Compute reconstruction Frobenius norm.
Sourcepub fn relative_error(&self, original: &DenseTensor) -> f64
pub fn relative_error(&self, original: &DenseTensor) -> f64
Relative error of this Tucker approximation.
Trait Implementations§
Source§impl Clone for TuckerDecomposition
impl Clone for TuckerDecomposition
Source§fn clone(&self) -> TuckerDecomposition
fn clone(&self) -> TuckerDecomposition
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 moreAuto Trait Implementations§
impl Freeze for TuckerDecomposition
impl RefUnwindSafe for TuckerDecomposition
impl Send for TuckerDecomposition
impl Sync for TuckerDecomposition
impl Unpin for TuckerDecomposition
impl UnsafeUnpin for TuckerDecomposition
impl UnwindSafe for TuckerDecomposition
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.