dbscan.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-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 
20 
21 #include <raft/distance/distance_types.hpp>
22 
23 #include <cstddef>
24 #include <cstdint>
25 
26 namespace raft {
27 class handle_t;
28 }
29 
30 namespace ML {
31 namespace Dbscan {
32 
34 
64 void fit(const raft::handle_t& handle,
65  float* input,
66  int n_rows,
67  int n_cols,
68  float eps,
69  int min_pts,
70  raft::distance::DistanceType metric,
71  int* labels,
72  int* core_sample_indices = nullptr,
73  float* sample_weight = nullptr,
74  size_t max_bytes_per_batch = 0,
75  EpsNnMethod eps_nn_method = BRUTE_FORCE,
76  int verbosity = CUML_LEVEL_INFO,
77  bool opg = false);
78 void fit(const raft::handle_t& handle,
79  double* input,
80  int n_rows,
81  int n_cols,
82  double eps,
83  int min_pts,
84  raft::distance::DistanceType metric,
85  int* labels,
86  int* core_sample_indices = nullptr,
87  double* sample_weight = nullptr,
88  size_t max_bytes_per_batch = 0,
89  EpsNnMethod eps_nn_method = BRUTE_FORCE,
90  int verbosity = CUML_LEVEL_INFO,
91  bool opg = false);
92 
93 void fit(const raft::handle_t& handle,
94  float* input,
95  int64_t n_rows,
96  int64_t n_cols,
97  float eps,
98  int min_pts,
99  raft::distance::DistanceType metric,
100  int64_t* labels,
101  int64_t* core_sample_indices = nullptr,
102  float* sample_weight = nullptr,
103  size_t max_bytes_per_batch = 0,
104  EpsNnMethod eps_nn_method = BRUTE_FORCE,
105  int verbosity = CUML_LEVEL_INFO,
106  bool opg = false);
107 void fit(const raft::handle_t& handle,
108  double* input,
109  int64_t n_rows,
110  int64_t n_cols,
111  double eps,
112  int min_pts,
113  raft::distance::DistanceType metric,
114  int64_t* labels,
115  int64_t* core_sample_indices = nullptr,
116  double* sample_weight = nullptr,
117  size_t max_bytes_per_batch = 0,
118  EpsNnMethod eps_nn_method = BRUTE_FORCE,
119  int verbosity = CUML_LEVEL_INFO,
120  bool opg = false);
121 
124 } // namespace Dbscan
125 } // namespace ML
#define CUML_LEVEL_INFO
Definition: log_levels.hpp:28
void fit(const raft::handle_t &handle, float *input, int n_rows, int n_cols, float eps, int min_pts, raft::distance::DistanceType metric, int *labels, int *core_sample_indices=nullptr, float *sample_weight=nullptr, size_t max_bytes_per_batch=0, EpsNnMethod eps_nn_method=BRUTE_FORCE, int verbosity=CUML_LEVEL_INFO, bool opg=false)
EpsNnMethod
Definition: dbscan.hpp:33
@ RBC
Definition: dbscan.hpp:33
@ BRUTE_FORCE
Definition: dbscan.hpp:33
Definition: dbscan.hpp:30
Definition: dbscan.hpp:26