Home
libcuml
cucim
cudf-java
cudf
cugraph
cuml
cuproj
cuspatial
cuvs
cuxfilter
dask-cuda
dask-cudf
kvikio
libcudf
libcuml
libcuproj
libcuspatial
libkvikio
librmm
libucxx
raft
rapids-cmake
rapidsmpf
rmm
stable (25.08)
nightly (25.10)
stable (25.08)
legacy (25.06)
include
cuml
cluster
kmeans_mg.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019-2025, 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
#include <
cuml/cluster/kmeans_params.hpp
>
21
22
namespace
raft
{
23
class
resources;
24
}
25
26
namespace
ML
{
27
namespace
kmeans {
28
namespace
opg {
29
52
void
fit
(
const
raft::resources& handle,
53
const
KMeansParams
&
params
,
54
const
float
* X,
55
int
n_samples,
56
int
n_features,
57
const
float
* sample_weight,
58
float
* centroids,
59
float
& inertia,
60
int
& n_iter);
61
62
void
fit
(
const
raft::resources& handle,
63
const
KMeansParams
&
params
,
64
const
double
* X,
65
int
n_samples,
66
int
n_features,
67
const
double
* sample_weight,
68
double
* centroids,
69
double
& inertia,
70
int
& n_iter);
71
72
void
fit
(
const
raft::resources& handle,
73
const
KMeansParams
&
params
,
74
const
float
* X,
75
int64_t n_samples,
76
int64_t n_features,
77
const
float
* sample_weight,
78
float
* centroids,
79
float
& inertia,
80
int64_t& n_iter);
81
82
void
fit
(
const
raft::resources& handle,
83
const
KMeansParams
&
params
,
84
const
double
* X,
85
int64_t n_samples,
86
int64_t n_features,
87
const
double
* sample_weight,
88
double
* centroids,
89
double
& inertia,
90
int64_t& n_iter);
91
};
// end namespace opg
92
};
// end namespace kmeans
93
};
// end namespace ML
ML::params
Definition:
params.hpp:34
kmeans.hpp
kmeans_params.hpp
ML::kmeans::opg::fit
void fit(const raft::resources &handle, const KMeansParams ¶ms, const float *X, int n_samples, int n_features, const float *sample_weight, float *centroids, float &inertia, int &n_iter)
Compute k-means clustering.
ML
Definition:
dbscan.hpp:29
raft
Definition:
dbscan.hpp:25
ML::kmeans::KMeansParams
Definition:
kmeans_params.hpp:33
Generated by
1.9.1