qbiocode.data_generation.make_spheres module#

Generate synthetic concentric n-dimensional spheres datasets for binary classification.

This module creates multiple configurations of high-dimensional concentric spheres datasets with varying sample sizes, dimensionality, and radii, useful for testing machine learning algorithms on high-dimensional non-linearly separable data.

Summary#

Functions:

generate_points_in_nd_sphere

Generate random points within an n-dimensional spherical shell.

Reference#

generate_points_in_nd_sphere(n_s, dim=3, radius=1, thresh=0.9)[source]#

Generate random points within an n-dimensional spherical shell.

Parameters:
  • n_s (int) – Number of points to generate.

  • dim (int, default=3) – Dimensionality of the sphere.

  • radius (float, default=1) – Outer radius of the spherical shell.

  • thresh (float, default=0.9) – Inner radius threshold as fraction of outer radius (creates shell).

Returns:

points – Generated points within the spherical shell.

Return type:

ndarray of shape (n_s, dim)