Generate spiral dataset up to 4 spirals. The dataset is generated based on Matt White's algorithm.
Download the source code and import it.
import spiralsdataset.py
The generator returns x and y coordinates and classes. The generator accepts two parameters: density and maximum point on x coordinate.
The more density is, the more points are there within maximum point on x coordinate. As default, density = 1 and maximum point is 6.5.
points, classes = generate_two_spirals_dataset(); // Generate two spirals dataset
points, classes = generate_three_spirals_dataset(); // Generate three spirals dataset
points, classes = generate_four_spirals_dataset(); // Generate four spirals dataset