#[non_exhaustive]pub struct CoClusterSelectResult {
pub best: CoClusterResult,
pub best_k: usize,
pub best_l: usize,
pub grid_scores: Vec<(usize, usize, f64, usize, f64)>,
pub slope_estimate: f64,
pub penalty_rate: f64,
}Expand description
Result of co_cluster_select: the slope-heuristic-selected (K, L) fit
together with full grid diagnostics.
§Grid diagnostics
grid_scores contains one entry per (K, L) pair in the sweep:
(K, L, log_likelihood, model_dim, penalised_score).
penalised_score = log_likelihood − penalty_rate × model_dim.
In fallback branches (single cell, flat slope, small grid) penalised_score = log_likelihood.
§Slope heuristic calibration
The Birgé–Massart penalty is estimated by OLS over the large-model (top-50% by dimension)
region of the fitted grid. This is a data-driven heuristic: it works best when the grid
spans a range of model dimensions and the data is well-separated enough for the
log-likelihood to grow linearly with dimension in the overparameterised region.
On poorly separated data the slope may be noisy and the selection may land at a boundary.
Inspect grid_scores to audit the selection.
§Divergence from R funHDDC
The slope calibration here uses OLS over the top-50% by model dimension (the “linear region” heuristic of Baudry, Maugis & Michel 2012). R’s funHDDC uses a slightly different calibration based on the full grid. The selected model may differ on small grids.
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.best: CoClusterResultThe selected (K*, L*) co-clustering result.
best_k: usizeSelected number of row clusters K*.
best_l: usizeSelected number of column clusters L*.
grid_scores: Vec<(usize, usize, f64, usize, f64)>All grid fits: (K, L, log_likelihood, model_dim, penalised_score).
penalised_score = log_likelihood − penalty_rate * model_dim.
In fallback branches (< 4 grid points, flat slope, etc.) penalised_score = log_likelihood.
slope_estimate: f64OLS slope estimated from the top-50% of fits by model dimension. Zero when the grid is too small or the slope heuristic fell back to max-LL.
penalty_rate: f64Penalty rate applied per model dimension: 2 × |slope_estimate|.
Zero in fallback branches.
Trait Implementations§
Source§impl Clone for CoClusterSelectResult
impl Clone for CoClusterSelectResult
Source§fn clone(&self) -> CoClusterSelectResult
fn clone(&self) -> CoClusterSelectResult
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 CoClusterSelectResult
impl RefUnwindSafe for CoClusterSelectResult
impl Send for CoClusterSelectResult
impl Sync for CoClusterSelectResult
impl Unpin for CoClusterSelectResult
impl UnsafeUnpin for CoClusterSelectResult
impl UnwindSafe for CoClusterSelectResult
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,
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.