#[non_exhaustive]pub struct CoClusterResult {
pub row_labels: Vec<usize>,
pub col_labels: Vec<usize>,
pub n_row_blocks: usize,
pub n_col_blocks: usize,
pub block_params: Vec<BlockParams>,
pub row_props: Vec<f64>,
pub col_props: Vec<f64>,
pub log_likelihood: f64,
pub icl: f64,
pub iterations: usize,
pub converged: bool,
}Expand description
Result of co_cluster.
The block structure is indexed as block_params[k * n_col_blocks + l]
where k ∈ 0..n_row_blocks and l ∈ 0..n_col_blocks.
§ICL formula
The ICL (Integrated Completed Likelihood) uses the symmetric Govaert-Nadif penalty:
p_KL = (K-1) + (L-1) + 2 * K * L * eff_ncomp
ICL = log_likelihood - 0.5 * p_KL * (ln(n) + ln(m))Here ln(n) penalises the n-curve row dimension and ln(m) penalises the
m-argument-point column dimension — reflecting that column-clusters partition
the m argument points (not the FPC components).
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.row_labels: Vec<usize>Hard row-cluster assignments, length n.
Values in 0..n_row_blocks.
col_labels: Vec<usize>Hard column-cluster assignments, length m (the number of argument points).
Values in 0..n_col_blocks. This always satisfies col_labels.len() == m —
columns cluster the argument points, NOT the FPC components.
n_row_blocks: usizeNumber of row clusters K.
n_col_blocks: usizeNumber of column clusters L.
block_params: Vec<BlockParams>Per-block Gaussian parameters, length K*L, indexed k*L + l.
Each element describes the diagonal Gaussian on the eff_ncomp-dimensional
block scores for the (k, l) block.
row_props: Vec<f64>Mixing proportions for row clusters, length K. Sums to 1.
col_props: Vec<f64>Mixing proportions for column clusters, length L. Sums to 1.
log_likelihood: f64Converged classification log-likelihood (non-decreasing across CEM iterations).
icl: f64ICL model-selection criterion (finite; lower = better model).
Formula: ICL = log_likelihood - 0.5 * p_KL * (ln(n) + ln(m))
where p_KL = (K-1) + (L-1) + 2*K*L*eff_ncomp.
iterations: usizeNumber of CEM iterations performed.
converged: boolWhether the algorithm converged before max_iter.
Trait Implementations§
Source§impl Clone for CoClusterResult
impl Clone for CoClusterResult
Source§fn clone(&self) -> CoClusterResult
fn clone(&self) -> CoClusterResult
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 CoClusterResult
impl Debug for CoClusterResult
Source§impl PartialEq for CoClusterResult
impl PartialEq for CoClusterResult
impl StructuralPartialEq for CoClusterResult
Auto Trait Implementations§
impl Freeze for CoClusterResult
impl RefUnwindSafe for CoClusterResult
impl Send for CoClusterResult
impl Sync for CoClusterResult
impl Unpin for CoClusterResult
impl UnsafeUnpin for CoClusterResult
impl UnwindSafe for CoClusterResult
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.