pub struct ClusterQuality {
pub internal_coherence: f64,
pub external_separation: f64,
pub silhouette_score: f64,
}Expand description
Quality metrics for a cluster
Fields§
§internal_coherence: f64Internal coherence: how similar methods within the cluster are (0-1, higher is better)
external_separation: f64External separation: how distinct the cluster is from others (0-1, higher is better)
silhouette_score: f64Silhouette score: combined quality metric (-1 to 1, >0.4 is good)
Implementations§
Source§impl ClusterQuality
impl ClusterQuality
Sourcepub fn is_good_quality(&self) -> bool
pub fn is_good_quality(&self) -> bool
Check if this cluster has good quality
Sourcepub fn is_acceptable(&self) -> bool
pub fn is_acceptable(&self) -> bool
Check if this cluster has acceptable quality
Sourcepub fn quality_description(&self) -> &'static str
pub fn quality_description(&self) -> &'static str
Get a human-readable quality description
Trait Implementations§
Source§impl Clone for ClusterQuality
impl Clone for ClusterQuality
Source§fn clone(&self) -> ClusterQuality
fn clone(&self) -> ClusterQuality
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 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
Source§impl Serialize for ClusterQuality
impl Serialize for ClusterQuality
impl Copy for ClusterQuality
Auto Trait Implementations§
impl Freeze for ClusterQuality
impl RefUnwindSafe for ClusterQuality
impl Send for ClusterQuality
impl Sync for ClusterQuality
impl Unpin 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,
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