GPU-equivalent of sklearn.datasets.make_blobs.
More...
|
void | ML::Datasets::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 | ML::Datasets::make_blobs (const raft::handle_t &handle, double *out, int64_t *labels, int64_t n_rows, int64_t n_cols, int64_t n_clusters, bool row_major=true, const double *centers=nullptr, const double *cluster_std=nullptr, const double cluster_std_scalar=1.0, bool shuffle=true, double center_box_min=-10.0, double center_box_max=10.0, uint64_t seed=0ULL) |
|
void | ML::Datasets::make_blobs (const raft::handle_t &handle, float *out, int *labels, int n_rows, int n_cols, int 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.0, uint64_t seed=0ULL) |
|
void | ML::Datasets::make_blobs (const raft::handle_t &handle, double *out, int *labels, int n_rows, int n_cols, int n_clusters, bool row_major=true, const double *centers=nullptr, const double *cluster_std=nullptr, const double cluster_std_scalar=1.0, bool shuffle=true, double center_box_min=-10.0, double center_box_max=10.0, uint64_t seed=0ULL) |
|
GPU-equivalent of sklearn.datasets.make_blobs.
- Parameters
-
[out] | out | generated data [on device] [dim = n_rows x n_cols] |
[out] | labels | labels for the generated data [on device] [len = n_rows] |
[in] | n_rows | number of rows in the generated data |
[in] | n_cols | number of columns in the generated data |
[in] | n_clusters | number of clusters (or classes) to generate |
[in] | row_major | whether input centers and output out buffers are to be stored in row or column major layout |
[in] | centers | centers of each of the cluster, pass a nullptr if you need this also to be generated randomly [on device] [dim = n_clusters x n_cols] |
[in] | cluster_std | standard deviation of each cluster center, pass a nullptr if this is to be read from the cluster_std_scalar . [on device] [len = n_clusters] |
[in] | cluster_std_scalar | if 'cluster_std' is nullptr, then use this as the std-dev across all dimensions. |
[in] | shuffle | shuffle the generated dataset and labels |
[in] | center_box_min | min value of box from which to pick cluster centers. Useful only if 'centers' is nullptr |
[in] | center_box_max | max value of box from which to pick cluster centers. Useful only if 'centers' is nullptr |
[in] | seed | seed for the RNG |
◆ make_blobs() [1/4]
void ML::Datasets::make_blobs |
( |
const raft::handle_t & |
handle, |
|
|
double * |
out, |
|
|
int * |
labels, |
|
|
int |
n_rows, |
|
|
int |
n_cols, |
|
|
int |
n_clusters, |
|
|
bool |
row_major = true , |
|
|
const double * |
centers = nullptr , |
|
|
const double * |
cluster_std = nullptr , |
|
|
const double |
cluster_std_scalar = 1.0 , |
|
|
bool |
shuffle = true , |
|
|
double |
center_box_min = -10.0 , |
|
|
double |
center_box_max = 10.0 , |
|
|
uint64_t |
seed = 0ULL |
|
) |
| |
◆ make_blobs() [2/4]
void ML::Datasets::make_blobs |
( |
const raft::handle_t & |
handle, |
|
|
double * |
out, |
|
|
int64_t * |
labels, |
|
|
int64_t |
n_rows, |
|
|
int64_t |
n_cols, |
|
|
int64_t |
n_clusters, |
|
|
bool |
row_major = true , |
|
|
const double * |
centers = nullptr , |
|
|
const double * |
cluster_std = nullptr , |
|
|
const double |
cluster_std_scalar = 1.0 , |
|
|
bool |
shuffle = true , |
|
|
double |
center_box_min = -10.0 , |
|
|
double |
center_box_max = 10.0 , |
|
|
uint64_t |
seed = 0ULL |
|
) |
| |
◆ make_blobs() [3/4]
void ML::Datasets::make_blobs |
( |
const raft::handle_t & |
handle, |
|
|
float * |
out, |
|
|
int * |
labels, |
|
|
int |
n_rows, |
|
|
int |
n_cols, |
|
|
int |
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.0 , |
|
|
uint64_t |
seed = 0ULL |
|
) |
| |
◆ make_blobs() [4/4]
void ML::Datasets::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 |
|
) |
| |