GENLSDATA

Generates linearly separable binary data.



 Synopsis:
  data = genlsdata(dim,num_data,margin)

 Description:
  It generates randomly binary labeled vectors which 
  are linearly separable with prescribed margin. 
 
 Input:
  dim [1x1] Data dimension.
  num_data [1x1] Number of generated data.
  margin [1x1] Minimal ensured margin (distance of the closest
   vector to the separating hyperplane).

 Output:
  data [struct] Generated data:
   .X [dim x num_data] Sample data.
   .y [1 x num_data] Data labels (1 or 2).

  model [struct] Ground truth linear classifier:
   .W [dim x 1] Normal vector of separating hyperplane.
   .b [1x1] Bias of the hyperplane.

 Example:
  data = genlsdata(2,50,1);
  model = ekozinec( data );
  model.margin
  figure; ppatterns(data); pline(model);

 See also
  PERCEPTRONEKOZINECLINCLASS, SVM.


Source: genlsdata.m

About: Statistical Pattern Recognition Toolbox
(C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
Czech Technical University Prague
Faculty of Electrical Engineering
Center for Machine Perception

Modifications:
3-may-2004, VF
16-Feb-2003, VF
26-feb-2001 V.Franc