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.

15 Downloads

Updated

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:
http://stackoverflow.com/questions/16146599/create-artificial-data-in-matlab

Comments and Ratings (4)

Xenya

Xenya (view profile)

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

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)
Acknowledgements

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