Skip to content

MOCluGen

MOCluGen is a MATLAB/Octave package for generating multidimensional clusters using the CluGen algorithm. It provides the clugen() function for this purpose, as well as a number of auxiliary functions, used internally and modularly by clugen(). Users can swap these auxiliary functions by their own customized versions, fine-tuning their cluster generation strategies, or even use them as the basis for their own generation algorithms.

How to install

Download the most recent version from the releases page or clone the development version with following command:

$ git clone https://github.com/clugen/MOCluGen.git

Open MATLAB or GNU Octave and cd into the project's folder, and run the startup.m script:

startup

MOCluGen is now ready to use.

Quick start

o = clugen(2, 4, 400, [1 0], pi / 8, [50, 10], 20, 1, 2, 'seed', 123);
scatter(o.points(:, 1), o.points(:, 2), 36, o.clusters, 'filled', 'MarkerEdgeColor', 'k');

2D example.

o = clugen(3, 4, 1000, [1 0 0], pi / 8, [20 15 25], 16, 4, 3.5, 'seed', 123);
scatter3(o.points(:, 1), o.points(:, 2), o.points(:, 3), 36, o.clusters, 'filled', 'MarkerEdgeColor', 'k');

3D example.

Further reading

The clugen algorithm and its several implementations are detailed in the following reference (please cite it if you use this software):

Also in this documentation