pub struct ClusterQuality {
pub silhouette_score: f64,
pub n_clusters: usize,
pub n_points: usize,
pub cluster_sizes: Vec<usize>,
pub converged: bool,
pub execution_time: Duration,
}Expand description
Cluster quality assessment metrics
Fields§
§silhouette_score: f64Silhouette score (-1 to 1, higher is better)
n_clusters: usizeNumber of clusters
n_points: usizeTotal number of data points
cluster_sizes: Vec<usize>Size of each cluster
converged: boolWhether algorithm converged
execution_time: DurationExecution time
Implementations§
Source§impl ClusterQuality
impl ClusterQuality
Sourcepub fn overall_quality(&self) -> QualityLevel
pub fn overall_quality(&self) -> QualityLevel
Assess overall clustering quality
Sourcepub fn is_balanced(&self) -> bool
pub fn is_balanced(&self) -> bool
Check for balanced clusters
Sourcepub fn cluster_size_stats(&self) -> ClusterSizeStats
pub fn cluster_size_stats(&self) -> ClusterSizeStats
Get cluster size statistics
Trait Implementations§
Source§impl Clone for ClusterQuality
impl Clone for ClusterQuality
Source§impl Debug for ClusterQuality
impl Debug for ClusterQuality
Source§impl<'de> Deserialize<'de> for ClusterQuality
impl<'de> Deserialize<'de> for ClusterQuality
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 ClusterQuality
impl RefUnwindSafe for ClusterQuality
impl Send for ClusterQuality
impl Sync for ClusterQuality
impl Unpin for ClusterQuality
impl UnsafeUnpin for ClusterQuality
impl UnwindSafe for ClusterQuality
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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