# demoGenData

## PURPOSE

Generate data drawn form a mixture of Gaussians.

## SYNOPSIS

function [X,IDX,T,IDT] = demoGenData(n,m,k,d,c,e,f)

## DESCRIPTION

     Generate data drawn form a mixture of Gaussians.

     Adapted from code by [Nikos Vlassis, 2000].
     For definitions see [Sanjoy Dasgupta, 1999].

     USAGE
      [X,IDX,T,IDT] = demoGenData(n,m,k,d,c,e,[f])

     INPUTS
      n    - size of training set
      m    - size of test set
      k    - number of components
      d    - dimension
      c    - separation degree (c>0)
      e    - maximum eccentricity (0 < e < 1)
      f    - [0] frac of points that are noise (uniformly distributed)

     OUTPUTS
      X    - training set (n x d)
      IDX  - cluster membership [see kmeans2.m]
      T    - test set (m x d)
      IDT  - cluster membership [see kmeans2.m]

     EXAMPLE
      [X,IDX,T,IDT] = demoGenData(250,250,4,4,.5,.5,.1);
      figure(1); clf; visualizeData( X, 2, IDX ); title('train');
      figure(2); clf; visualizeData( T, 2, IDT ); title('test');

     See also VISUALIZEDATA, DEMOCLUSTER, DEMOCLASSIFY

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2008 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Lesser GPL [see external/lgpl.txt]

## CROSS-REFERENCE INFORMATION

This function calls:

- c clc - clear command window.

This function is called by:

- demoCluster Clustering demo.