File Exchange

image thumbnail

6 functions for generating artificial datasets

version 1.0 (39.9 KB) by

6 parameterized functions that generate distinct 2D datasets for Machine Learning purposes.



View License

* twospirals.m generates two classes representing two spirals
* clusterincluster.m generates two circular classes
* corners.m generates four classes, each corresponding to a corner shape pointing towards the center
* halfkernel.m generates two half ellipses, one inside the other
* crescentfullmoon.m generates one circular class and one larger crescent folded around it.
* outlier.m produces 2 large circular classes, and 2 smaller classes of outliers.

Inspired by the following StackOverflow question:

Comments and Ratings (4)


Xenya (view profile)

I have a 2014a matlab, which has randi, not randintSo had to apply this patch to clusterincluster to get it going:
if ~isempty(z)
dist1 = r1 + randint(N1,1,3)/3 * r1 * w1;
dist1 = r1 + randi(3,[N1,1])/3 * r1 * w1;

Nejc Ilc

Nejc Ilc (view profile)

Thanks a whole lot!

chang hsiung

thanks a lot, this will be very useful.

MATLAB Release
MATLAB 7.12 (R2011a)

Inspired: DBSCAN

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today