File Exchange

image thumbnail

6 functions for generating artificial datasets

version 1.0.0.0 (39.9 KB) by Jeroen Kools
6 parameterized functions that generate distinct 2D datasets for Machine Learning purposes.

7 Downloads

Updated 23 Apr 2013

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 (5)

Alaa Othman

Good work. Thanks

Xenya

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

Thanks a whole lot!

thanks a lot, this will be very useful.

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: DBSCAN