perClass Documentation
development version 3.2 (14-Mar-2012)
Content

Comments? Ideas? Compliments?

Your email (only if you wish to be contacted)

SDRELAB Rename classes or define meta-classes

    OUT=SDRELAB(IN,MAP)
    OUT=SDRELAB(IN,options)

    P2=SDRELAB(P,LIST)  % rename decisions in pipeline P

 INPUT
    IN    SDLAB or SDDATA object
    MAP   Cell array with relabeling rules
    P     Pipeline returning decisions
    LIST  SDLIST with new decisions

 OUTPUT
    OUT   Relabeled SDLAB or SDDATA object
    P2    Pipeline returning decisions in LIST

 OPTIONS
  'nodisplay'     - do not show the final label translation table
  'all','newname' - label all samples as newname
  'add','prefix'  - add prefix string to all class names
  'suffix'        - add suffix string to all class names
  'add to all'    - add prefix string to all groups in all indexed sample
                    properties (sdlab). IN must be SDDATA object

 DESCRIPTION
 SDRELAB allows us to redefine class names in SDLAB or SDDATA objects.
 Class renaming rules are defined in a cell array MAP with source and
 destination entries. Classes may be specified by names or indices. The
 Tilde character (~) in the source class name defines the negation. This
 means that the rule applies to all remainig classes.  SDRELAB prints the
 translation table by default. To suppress it, use 'nodisplay' option.
 SDRELAB may also rename decisions in a pipeline P, by providing SDLIST
 object with the same number of entries as P.list

 EXAMPLES
  % relabel first two classes into 'fruit' and third class into 'outlier'
  B=sdrelab(A,{1:2,'fruit' 3 'outlier'})
  B=sdrelab(A,{'~outlier','target'}) % what is not 'outlier' becomes 'target'
  B=sdrelab(A,'add','old-')    % add prefix 'old-' to all class names
  B=sdrelab(A,'all','unknown') % label all samples in A as 'unknown'

sdrelab is referenced in examples: