pub struct NmeScClusterer { /* private fields */ }Expand description
NME-SC (Normalized Maximum Eigengap Spectral Clustering) clusterer.
Thin adapter over the shared spectral graph (k-NN affinity + Laplacian
spectrum in crate::spectral): the normalized-maximum eigengap picks k
directly, then kmeans_pp runs on the spectral embedding.
Implementations§
Trait Implementations§
Source§impl Clusterer for NmeScClusterer
Available on crate feature spectral only.
impl Clusterer for NmeScClusterer
Available on crate feature
spectral only.Source§fn cluster(&self, embeddings: &[Vec<f32>]) -> Result<Vec<usize>, ClustererError>
fn cluster(&self, embeddings: &[Vec<f32>]) -> Result<Vec<usize>, ClustererError>
Cluster
embeddings. Each inner vector must have the same length and
be approximately L2-normalized. Read moreSource§fn max_clusters(&self) -> usize
fn max_clusters(&self) -> usize
Hard ceiling on the number of clusters this implementation can produce.
Source§fn cluster_with_durations(
&self,
embeddings: &[Vec<f32>],
durations_secs: &[f64],
) -> Result<Vec<usize>, ClustererError>
fn cluster_with_durations( &self, embeddings: &[Vec<f32>], durations_secs: &[f64], ) -> Result<Vec<usize>, ClustererError>
Cluster with per-embedding durations (seconds). Defaults to ignoring
durations and calling
Self::cluster. Backends that filter short embeddings
(cVBx short-segment exclusion) override this so unreliable short windows
are kept out of AHC/VB and reassigned afterward. Read moreSource§fn wants_raw_embeddings(&self) -> bool
fn wants_raw_embeddings(&self) -> bool
Whether this clusterer wants raw (non-L2-normalized) embeddings. Cosine
clusterers (AHC, NME-SC) are scale-invariant and default to
false; a PLDA
backend needs the original embedding scale for its mean-centering and
overrides to true.Auto Trait Implementations§
impl Freeze for NmeScClusterer
impl RefUnwindSafe for NmeScClusterer
impl Send for NmeScClusterer
impl Sync for NmeScClusterer
impl Unpin for NmeScClusterer
impl UnsafeUnpin for NmeScClusterer
impl UnwindSafe for NmeScClusterer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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