tadasets.dsphere¶
- tadasets.dsphere(n: int = 100, d: int = 2, r: float = 1, noise: float | None = None, ambient: int | None = None, seed: int | None = None) ndarray [source]¶
Sample
n
data points on ad
-sphere.- Parameters:
n (int, default=100) – Number of data points in shape.
d (int, default=2) – Intrinsic dimension of
d
-sphere.r (float, default=1) – Radius of sphere.
noise (float, optional) – Standard deviation of normally distributed noise added to data.
ambient (int, optional) – Embed the sphere into a space with ambient dimension equal to ambient. The sphere is randomly rotated in this high dimensional space.
seed (int, optional) – Seed for random state.
- Returns:
data (np.ndarray) – An
(n,ambient)
np.ndarray ifambient
is specifed or a(n,d+1)
np.ndarray otherwise.