kmeans_mg.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cuml/cluster/kmeans.hpp>
20 
21 namespace raft {
22 class handle_t;
23 }
24 
25 namespace ML {
26 namespace kmeans {
27 namespace opg {
28 
51 void fit(const raft::resources& handle,
52  const KMeansParams& params,
53  const float* X,
54  int n_samples,
55  int n_features,
56  const float* sample_weight,
57  float* centroids,
58  float& inertia,
59  int& n_iter);
60 
61 void fit(const raft::resources& handle,
62  const KMeansParams& params,
63  const double* X,
64  int n_samples,
65  int n_features,
66  const double* sample_weight,
67  double* centroids,
68  double& inertia,
69  int& n_iter);
70 
71 void fit(const raft::resources& handle,
72  const KMeansParams& params,
73  const float* X,
74  int64_t n_samples,
75  int64_t n_features,
76  const float* sample_weight,
77  float* centroids,
78  float& inertia,
79  int64_t& n_iter);
80 
81 void fit(const raft::resources& handle,
82  const KMeansParams& params,
83  const double* X,
84  int64_t n_samples,
85  int64_t n_features,
86  const double* sample_weight,
87  double* centroids,
88  double& inertia,
89  int64_t& n_iter);
90 }; // end namespace opg
91 }; // end namespace kmeans
92 }; // end namespace ML
Definition: params.hpp:34
void fit(const raft::resources &handle, const KMeansParams &params, const float *X, int n_samples, int n_features, const float *sample_weight, float *centroids, float &inertia, int &n_iter)
Compute k-means clustering.
cuvs::cluster::kmeans::params KMeansParams
Definition: kmeans.hpp:31
Definition: dbscan.hpp:30
Definition: dbscan.hpp:26