Expand description
Deterministic synthetic datasets for demonstrating and testing the learning algorithms.
Every generator takes a seed, so results are reproducible. Feature matrices have one sample per row.
See the book entry Foundations.
Functions§
- make_
blobs - Gaussian blobs:
per_clusterpoints around each centre with standard deviationspread. Returns the points and the true cluster of each. - make_
circles - Two concentric circles: the inner has radius
factortimes the outer’s (radius 1). - make_
classification - Three Gaussian classes in four dimensions with deliberately overlapping, correlated features, a small stand-in for a tabular classification benchmark.
- make_
moons - Two interleaving half circles (“moons”):
npoints per moon with Gaussian noise. - make_
regression - A linear regression problem
y = Xw + b + noisewith standard-normal features. Returns(x, y, true weights, true intercept). - make_
sine - A noisy sine curve
y = sin(x)sampled atsamplesrandom points in[0, 2π], as a one-column feature matrix; a classic nonlinear regression demonstration. - make_
swiss_ roll - The “Swiss roll”: a 2D sheet rolled up in 3D, a standard test for manifold learning. Returns the 3D points and each point’s position along the roll.