perClass Documentation
version 5.1 (31-May-2017)
 SDPROX  Proximity representation

 Computate proximities to prototypes, return data set

 Creating proximity pipeline for computing proximities later

 Create proximity data set by providing the raw data matrix.

  DATA     SDDATA set or data matrix with samples to be used
           for direct proximity computation
  PROTO    SDDATA or data matrix with prototype samples
  TYPE     proximity type
   SQEUCL    squared Euclidean distance (default)
   EUCL      Euclidean distance
   LINEAR    linear form (inner product)
   POLY      polynomial kernel (PAR degree, def=3)
   RBF       radial basis kernel (PAR sigma, def=1.0)
   SAM       Spectral Angle Mapper
   ASAM      ACOS of Spectral Angle Mapper
   KOL       Kolmogorov distance (assummes that feature vectors
             sum-to-one, use SDNORM)
   MATCH     Matching distance (sum of differences between
             cum.distr.func, assumes features sum-to-one)
  PAR      proximity parameter (optional)
  D_raw    Raw proximity matrix (num.of samples in DATA x
           num.of samples in PROTO)

  PP       pipeline object
  D        SDDATA set with distances from samples in DATA to PROTO

 SDPROX computes proximities to a set of prototypes. If DATA and PROTO are
 provided, SDPROX returns SDDATA object with proximity values.  If only
 PROTO is given, SDPROX returns the pipline PP which may be applied to any
 new DATA to compute proximities.
 The raw matrix of proximities D_raw may be provided which is computed by
 custom code. SDPROX then creates a data set D which contains sample
 properties of DATA and data matrix D_raw. It copies sample properties of
 PROTO making them feature properties in D (adding 'proto_' prefix).

 >> D=sdprox(data,proto)  % compute squared Euclidean distances
 >> D=sdprox(data,proto,'SAM')  % compute Spectral Angle Mapper distances
 >> pp=sdprox(proto,'eucl'); D=data*pp % create and apply proximity pipeline