perClass Documentation
version 5.1 (31-May-2017)
SDCOMBINE Fixed classifier combiner

    PC=SDCOMBINE(PS,RULE)

  crisp combiner:
    PC=SDCOMBINE([P1 P2 ...],RULE)
  soft output combiner:
    PC=SDCOMBINE([-P1 -P2 ...],RULE)

 INPUT
    PS      Stack pipeline (constructed by SDSTACK or concatenation [])
    RULE    String fusion rule
              on soft ouptus: 'mean' (default),'prod','min','max'
              on crisp outputs: 'all agree' or 'at least'
    P1,P2   Classifier pipelines

 OUTPUT
    PC      Combiner pipeline

 OPTIONS
  'mean','prod','max','min' - fixed combiner type is PS returns soft outputs
  'all agree' - crisp combining rule
  'at least',N - crisp combining, (default N is number of classifiers)
  'target',NAME - name of target class for 'at least' rule
  'reject',NAME - name of reject decision for crisp rules (def:'reject')

 DESCRIPTION
 SDCOMBINE adds fixed combination step to a stack pipeline with multiple
 classifiers.
 If the pipelines return soft outputs, mean, prod, min and max rules can be used.
 Crisp decision combining is possible with:
  'all agree' rule: if all classifiers agree, this class, otherwise 'reject'
  'at least' rule: target class must be defined. If at least N classifiers
      votes for the target, it's target, otherwise reject

 EXAMPLES
 SOFT outputs combining:
  p1=sdlinear(a); p2=sdnorm( -sdparzen(a) ) % so that both return posteriors
  pc=sdcombine([-p1 -p2],'prod');

 CRISP decision combiner:
  p1=sdgauss(a); p2=sdparzen(a); % classifiers return decisions by default -> crisp
  pc=sdcombine([p1 p2],'all agree');
  pc2=sdcombine([p1 p2],'at least',1,'target','apple');

 SEE ALSO
 SDSTACK