[][src]Function linfa_clustering::generate_blobs

pub fn generate_blobs(
    blob_size: usize,
    blob_centroids: &ArrayBase<impl Data<Elem = f64>, Ix2>,
    rng: &mut impl Rng
) -> Array2<f64>

Given an input matrix blob_centroids, with shape (n_blobs, n_features), generate blob_size data points (a "blob") around each of the blob centroids.

More specifically, each blob is formed by blob_size points sampled from a normal distribution centered in the blob centroid with unit variance.

generate_blobs can be used to quickly assemble a synthetic dataset to test or benchmark various clustering algorithms on a best-case scenario input.