make_blobs.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2022, 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 <cstdint>
20 
21 namespace raft {
22 class handle_t;
23 }
24 
25 namespace ML {
26 namespace Datasets {
27 
60 void make_blobs(const raft::handle_t& handle,
61  float* out,
62  int64_t* labels,
63  int64_t n_rows,
64  int64_t n_cols,
65  int64_t n_clusters,
66  bool row_major = true,
67  const float* centers = nullptr,
68  const float* cluster_std = nullptr,
69  const float cluster_std_scalar = 1.f,
70  bool shuffle = true,
71  float center_box_min = -10.f,
72  float center_box_max = 10.f,
73  uint64_t seed = 0ULL);
74 void make_blobs(const raft::handle_t& handle,
75  double* out,
76  int64_t* labels,
77  int64_t n_rows,
78  int64_t n_cols,
79  int64_t n_clusters,
80  bool row_major = true,
81  const double* centers = nullptr,
82  const double* cluster_std = nullptr,
83  const double cluster_std_scalar = 1.0,
84  bool shuffle = true,
85  double center_box_min = -10.0,
86  double center_box_max = 10.0,
87  uint64_t seed = 0ULL);
88 void make_blobs(const raft::handle_t& handle,
89  float* out,
90  int* labels,
91  int n_rows,
92  int n_cols,
93  int n_clusters,
94  bool row_major = true,
95  const float* centers = nullptr,
96  const float* cluster_std = nullptr,
97  const float cluster_std_scalar = 1.f,
98  bool shuffle = true,
99  float center_box_min = -10.f,
100  float center_box_max = 10.0,
101  uint64_t seed = 0ULL);
102 void make_blobs(const raft::handle_t& handle,
103  double* out,
104  int* labels,
105  int n_rows,
106  int n_cols,
107  int n_clusters,
108  bool row_major = true,
109  const double* centers = nullptr,
110  const double* cluster_std = nullptr,
111  const double cluster_std_scalar = 1.0,
112  bool shuffle = true,
113  double center_box_min = -10.0,
114  double center_box_max = 10.0,
115  uint64_t seed = 0ULL);
118 } // namespace Datasets
119 } // namespace ML
void make_blobs(const raft::handle_t &handle, float *out, int64_t *labels, int64_t n_rows, int64_t n_cols, int64_t n_clusters, bool row_major=true, const float *centers=nullptr, const float *cluster_std=nullptr, const float cluster_std_scalar=1.f, bool shuffle=true, float center_box_min=-10.f, float center_box_max=10.f, uint64_t seed=0ULL)
void shuffle(std::vector< math_t > &rand_indices, std::mt19937 &g)
Definition: shuffle.h:35
Definition: dbscan.hpp:30
Definition: dbscan.hpp:26