Generate data drawn form a mixture of Gaussians. For definitions of separation and eccentricity see: Sanjoy Dasgupta, "Learning Mixtures of Gaussians", FOCS, 1999. http://cseweb.ucsd.edu/~dasgupta/papers/mog.pdf USAGE [X0,H0,X1,H1] = demoGenData(n0,n1,k,d,sep,ecc,[frc]) INPUTS n0 - size of training set n1 - size of testing set k - number of mixture components d - data dimension sep - minimum separation degree between clusters (sep > 0) ecc - maximum eccentricity of clusters (0 < ecc < 1) frc - [0] frac of points that are noise (uniformly distributed) OUTPUTS X0 - [n0xd] training set data vectors H0 - [n0x1] cluster membership in [1,k] (and -1 for noise) X1 - [n1xd] testing set data vectors H1 - [n1x1] cluster membership in [1,k] (and -1 for noise) EXAMPLE n0=1000; k=5; d=2; sep=2; ecc=1; frc=0; [X0,H0,X1,H1] = demoGenData(n0,n0,k,d,sep,ecc,frc); figure(1); clf; visualizeData( X0, 2, H0 ); title('train'); figure(2); clf; visualizeData( X1, 2, H1 ); title('test'); See also visualizeData, demoCluster Piotr's Computer Vision Matlab Toolbox Version 3.20 Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] Licensed under the Simplified BSD License [see external/bsd.txt]