[−][src]Struct linfa_clustering::KMeansHyperParamsBuilder
An helper struct used to construct a set of valid hyperparameters for the K-means algorithm (using the builder pattern).
Methods
impl KMeansHyperParamsBuilder
[src]
pub fn max_n_iterations(self, max_n_iterations: u64) -> Self
[src]
Set the value of max_n_iterations
.
We exit the training loop when the number of training iterations
exceeds max_n_iterations
even if the tolerance
convergence
condition has not been met.
pub fn tolerance(self, tolerance: f64) -> Self
[src]
Set the value of tolerance
.
The training is considered complete if the euclidean distance
between the old set of centroids and the new set of centroids
after a training iteration is lower or equal than tolerance
.
pub fn build(self) -> KMeansHyperParams
[src]
Return an instance of KMeansHyperParams
after
having performed validation checks on all the specified hyperparamters.
Panics if any of the validation checks fails.
Auto Trait Implementations
impl Send for KMeansHyperParamsBuilder
impl Sync for KMeansHyperParamsBuilder
impl Unpin for KMeansHyperParamsBuilder
impl UnwindSafe for KMeansHyperParamsBuilder
impl RefUnwindSafe for KMeansHyperParamsBuilder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,