Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Artificial Data in MATLAB

I need some artificial data namely, "Two-Spiral", "Cluster-inside-Cluster", "Half-Kernel", "crescent-full-moon", and "outlier" for Machine Learning purposes.

Artificial Data

Is there any guide/package/source-code in MATLAB?

like image 950
BlueBit Avatar asked Apr 22 '13 11:04

BlueBit


1 Answers

Because I thought it would be useful to have these kind of datasets available and because it would be a fun exercise, I wrote some functions to generate random datasets that are very similar to the ones shown in your picture. There are a bunch of options to control the number of instances, amount of noise, etc. The output for each function is an Nx3 matrix, where each line contains the X,Y coordinates and the class of an instance.

This is what the output looks like:

Example of generated datasets

I did it in 6 scripts of 30-40 lines each. I uploaded the scripts to the Matlab File Exchange but it hasn't been reviewed yet. For now, you can get the files here. There are barely any comments in this first version, but I hope the code is self-explanatory. There is also a demo script (datasetsdemo.m) that will run all the scripts and produce the image shown above.

like image 158
Junuxx Avatar answered Sep 30 '22 04:09

Junuxx