Enum linfa_clustering::IncrKMeansError [−][src]
pub enum IncrKMeansError<M: Debug> {
InvalidParams(KMeansParamsError),
NotConverged(M),
LinfaError(Error),
}
Variants
InvalidParams(KMeansParamsError)
When any of the hyperparameters are set the wrong value
Tuple Fields of InvalidParams
When the distance between the old and new centroids exceeds the tolerance parameter. Not an actual error, just there to signal that the algorithm should keep running.
LinfaError(Error)
Tuple Fields of LinfaError
0: Error
Trait Implementations
fn fit_with(
&self,
model: Self::ObjectIn,
dataset: &'a DatasetBase<ArrayBase<DA, Ix2>, T>
) -> Result<Self::ObjectOut, IncrKMeansError<Self::ObjectOut>>
fn fit_with(
&self,
model: Self::ObjectIn,
dataset: &'a DatasetBase<ArrayBase<DA, Ix2>, T>
) -> Result<Self::ObjectOut, IncrKMeansError<Self::ObjectOut>>
Performs a single batch update of the Mini-Batch K-means algorithm.
Given an input matrix observations
, with shape (n_batch, n_features)
and a previous
KMeans
model, the model’s centroids are updated with the input matrix. If model
is
None
, then it’s initialized using the specified initialization algorithm. The return
value consists of the updated model and a bool
value that indicates whether the algorithm
has converged.
Performs the conversion.