SPIDER The Spider Objects

DATA_GLOBAL object


   Stores data into two components X (input) and Y (output).
   The difference to the data object consists in storing data in global
   variables X and Y to avoid them to be copied on new functions calls. This
   reduces memory overheads.
  
   An object is created with:
     data_global('name',X,Y);  
         or 
     data_global(X,Y); 
         or
     data_global(X) (in case there's no name)
  
     If you want to create it with globals, define X and Y and call
     data_global('name') or just data_global.
  
   Public attributes:
    X          -- input matrix        
    Y          -- output matrix       
    index      -- original parent indices of examples 
    findex     -- original parent indices of features 
  
   Public methods:
    d=get(data,index,featInd)             -- return data,index only (ind)examples,(find)features 
    x=get_x(data,index,fInd)              -- return x,index only (ind)examples,(find)features 
    y=get_y(data,index,fInd)              -- return y,index only (ind)examples,(find)features 
    d=set_x(data,X,indes,featInd)         -- set inputs indexed by (ind)examples,(find)features
    d=set_y(data,Y,index,featInd)         -- set outputs indxed by (ind)examples,(find)features
    [indes,featInd]=get_index(d)          -- returns example and feature indices
    [numEx,vDim,oDim,numCls]=get_dim(d)   -- returns number of examples,features,output dimensions,classes 
  
   Example: 
            global X; X=[1:5;6:10;11:15]; get_x(data_global('gi'),[1 3],[3:5])
  
   Note:
   Fast storage of data is achieved by using global X, i.e  X(index,findex).
   xx and yy (optionally) can be stored if different from original. If 
   xx is empty then it is assumed to be equal to global X with given indexes. The same is considered
   for yy ALSO, even if xx instantiated, always global Y(index,:) is used.