pub struct FamilyCoherence {
pub spectral_gap: f64,
pub mean_similarity: f64,
pub compactness: f64,
}Expand description
Spectral coherence summary for a family of mask embeddings.
Fields§
§spectral_gap: f64Spectral gap of the cosine-similarity graph (0 = disconnected, 1 = clique).
mean_similarity: f64Mean pairwise cosine similarity over all pairs in the family.
compactness: f64Compactness: fraction of edges whose similarity exceeds the threshold.
Implementations§
Source§impl FamilyCoherence
impl FamilyCoherence
Sourcepub fn is_promotable(&self) -> bool
pub fn is_promotable(&self) -> bool
Whether this family qualifies for promotion to demo mode.
A family is promotable when:
- its mean pairwise similarity exceeds [
PROMOTE_MEAN_SIM], AND - either the spectral gap exceeds [
PROMOTE_SPECTRAL_GAP], OR the family is fully connected (compactness == 1.0 and mean_similarity is near 1.0), which can occur when all masks are numerically identical.
Trait Implementations§
Source§impl Clone for FamilyCoherence
impl Clone for FamilyCoherence
Source§impl Debug for FamilyCoherence
impl Debug for FamilyCoherence
Source§impl<'de> Deserialize<'de> for FamilyCoherence
impl<'de> Deserialize<'de> for FamilyCoherence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for FamilyCoherence
impl Freeze for FamilyCoherence
impl Move for FamilyCoherence
impl RefUnwindSafe for FamilyCoherence
impl Send for FamilyCoherence
impl Sync for FamilyCoherence
impl Unpin for FamilyCoherence
impl UnsafeUnpin for FamilyCoherence
impl UnwindSafe for FamilyCoherence
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