forked from rapidsai/cuml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbscan_api.h
52 lines (48 loc) · 2.21 KB
/
dbscan_api.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Copyright (c) 2019, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <cuml/cuml_api.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup DbscanC C-wrapper to C++ implementation of Dbscan algo
* @brief Fits a DBSCAN model on an input feature matrix and outputs the labels.
* @param[in] handle cuml handle to use across the algorithm
* @param[in] input row-major input feature matrix
* @param[in] n_rows number of samples in the input feature matrix
* @param[in] n_cols number of features in the input feature matrix
* @param[in] eps the epsilon value to use for epsilon-neighborhood determination
* @param[in] min_pts minimum number of points to determine a cluster
* @param[out] labels (size n_rows) output labels array
* @param[in] max_mem_bytes: the maximum number of bytes to be used for each batch of
* the pairwise distance calculation. This enables the trade off between
* memory usage and algorithm execution time.
* @param[in] verbosity Set a verbosity level (higher values means quieter)
* Refer to `cuml/common/logger.hpp` for these levels
* @return CUML_SUCCESS on success and other corresponding flags upon any failures.
* @{
*/
cumlError_t cumlSpDbscanFit(cumlHandle_t handle, float *input, int n_rows,
int n_cols, float eps, int min_pts, int *labels,
size_t max_bytes_per_batch, int verbosity);
cumlError_t cumlDpDbscanFit(cumlHandle_t handle, double *input, int n_rows,
int n_cols, double eps, int min_pts, int *labels,
size_t max_bytes_per_batch, int verbosity);
/** @} */
#ifdef __cplusplus
}
#endif