pub struct EmbeddingQuality {
pub dimensions: usize,
pub num_vectors: usize,
pub connected_components: usize,
pub clustering_coefficient: f32,
pub avg_degree: f32,
pub degree_std: f32,
pub mode_collapse_score: f32,
pub degeneracy_score: f32,
pub spread: f32,
pub persistence_score: f32,
pub quality_score: f32,
}Expand description
Embedding quality metrics
Fields§
§dimensions: usizeEmbedding dimensions
num_vectors: usizeNumber of vectors
connected_components: usizeNumber of connected components
clustering_coefficient: f32Clustering coefficient (0-1)
avg_degree: f32Average node degree
degree_std: f32Degree standard deviation
mode_collapse_score: f32Mode collapse score (0=collapsed, 1=good)
degeneracy_score: f32Degeneracy score (0=full rank, 1=degenerate)
spread: f32Average spread from centroid
persistence_score: f32Topological persistence score
quality_score: f32Overall quality (0-1, higher is better)
Implementations§
Source§impl EmbeddingQuality
impl EmbeddingQuality
Sourcepub fn has_mode_collapse(&self) -> bool
pub fn has_mode_collapse(&self) -> bool
Check if embeddings show signs of mode collapse
Sourcepub fn is_degenerate(&self) -> bool
pub fn is_degenerate(&self) -> bool
Check if embeddings are degenerate
Sourcepub fn is_good_quality(&self) -> bool
pub fn is_good_quality(&self) -> bool
Check if embeddings are well-structured
Sourcepub fn assessment(&self) -> &str
pub fn assessment(&self) -> &str
Get quality assessment
Trait Implementations§
Source§impl Clone for EmbeddingQuality
impl Clone for EmbeddingQuality
Source§fn clone(&self) -> EmbeddingQuality
fn clone(&self) -> EmbeddingQuality
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmbeddingQuality
impl Debug for EmbeddingQuality
Source§impl<'de> Deserialize<'de> for EmbeddingQuality
impl<'de> Deserialize<'de> for EmbeddingQuality
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 Freeze for EmbeddingQuality
impl RefUnwindSafe for EmbeddingQuality
impl Send for EmbeddingQuality
impl Sync for EmbeddingQuality
impl Unpin for EmbeddingQuality
impl UnwindSafe for EmbeddingQuality
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more