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