pub struct KMeansModel<T: KMeansElement> { /* private fields */ }Implementations§
Source§impl<T: KMeansElement> KMeansModel<T>
impl<T: KMeansElement> KMeansModel<T>
pub fn fit( resources: &CuvsResources, data: &ValidatedDeviceTensor<'_, T>, params: KMeansParams, initial_centroids: Option<DeviceBuffer<T>>, ) -> Result<Self>
Sourcepub fn fit_with_initial_centroids(
resources: &CuvsResources,
data: &ValidatedDeviceTensor<'_, T>,
params: KMeansParams,
initial_centroids: Option<OwnedMatrix<T>>,
) -> Result<Self>
pub fn fit_with_initial_centroids( resources: &CuvsResources, data: &ValidatedDeviceTensor<'_, T>, params: KMeansParams, initial_centroids: Option<OwnedMatrix<T>>, ) -> Result<Self>
Fit KMeans with an optional owned row-major centroid relation.
Consumed centroids satisfy the exclusive mutable ownership required
by KMeansInit::Array.
pub fn predict_into( &self, data: &ValidatedDeviceTensor<'_, T>, labels: &mut DeviceBuffer<i32>, ) -> Result<KMeansPrediction>
pub fn params(&self) -> &KMeansParams
pub fn fit_result(&self) -> KMeansFit
pub fn centroids(&self) -> &OwnedMatrix<T>
pub fn n_features(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for KMeansModel<T>
impl<T> !Send for KMeansModel<T>
impl<T> !Sync for KMeansModel<T>
impl<T> !UnwindSafe for KMeansModel<T>
impl<T> Freeze for KMeansModel<T>where
OwnedMatrix<T>: Freeze,
impl<T> Unpin for KMeansModel<T>where
OwnedMatrix<T>: Unpin,
impl<T> UnsafeUnpin for KMeansModel<T>where
OwnedMatrix<T>: UnsafeUnpin,
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