MINBALL

Minimal enclosing ball in kernel feature space.



 Synopsis:
  model = minball(X)
  model = minball(X,options)

 Description:
  It computes center and radius of the minimal ball
  enclosing data X mapped into a feature space induced 
  by a given kernel. The problem leads to a QP problem which is 
  solve by 'quadprog' of the MATLAB Optimization toolbox.
 
 Input:
  X [dim x num_data] Input data.
  options [struct] Control parameters:
   .ker [string] Kernel identifier (default 'linear'). See 'help kernel'.
   .arg [1 x nargs] Kernel arguments.
   .eps [1x1] Multipliers less then eps are set to zero (default 1e-12).
   .mu [1x1] Regularization constant given to diagonal of the 
     kernel matrix (default 1e-12).

 Output:
  model [struct] Center of the ball in the kernel feature space:
   .sv.X [dim x nsv] Data determining the center.
   .Alpha [nsv x 1] Data weights.
   .r [1x1] Radius of the minimal enclosing ball.
   .b [1x1] Squared norm of the center equal to Alpha'*K*Alpha.
   .options [struct] Copy of used options.

 Example:
  data = load('riply_trn');
  options = struct('ker','linear','arg',1);
  model = minball(data.X,options);
  [Ax,Ay] = meshgrid(linspace(-5,5,100),linspace(-5,5,100));
  dist = kdist([Ax(:)';Ay(:)'],model);
  figure; hold on; 
  ppatterns(data.X); ppatterns(model.sv.X,'ro',12);
  contour( Ax, Ay, reshape(dist,100,100),[model.r model.r]);

 See also
  KDIST.


Source: minball.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:
25-aug-2004, VF, added model.fun = 'kdist' and .diag_add changed to .mu
16-may-2004, VF
15-jun-2002, VF