perClass Documentation
version 5.4 (7-Dec-2018)
 SDDETECT  training a detector given a target class and model

      PD=SDDETECT(DATA,TCLASS,MODEL,options)

 INPUT
   DATA     a data set
   TCLASS   target class name
   MODEL    untrained pipeline

 OUTPUT
   PD       detector pipeline

 OPTIONS
   'reject',N     Fraction or number of target class samples to reject
   'target',name  Name of the target decision in the final detector
   'non-target',name  Name of the non-target decision in the final detector
   'test',TS      External test set used to set detector threshold with ROC
   'nodisplay'    Do not display class mapping table
   'measures',M   Specify ROC measures to be estimated like for sdroc function
   'confmat'      Store confmat in the ROC (useful for visualization/cost optim)

 DESCRIPTION
 SDDETECT provides one-command training of a TCLASS detector on DATA using
 MODEL. By default it splits DATA into 80% which is used for training the
 MODEL on target class TCLASS.  Decision threshold is fixed using ROC
 analysis performed on the remaining 20% of data.  If external test set is
 provided with 'test' option, it is used for ROC analysis (complete DATA
 is used for training a model).  If TCLASS is not present in DATA,
 detector is trained on all DATA samples. In this one-class scenario,
 SDDETECT by default accepts all samples in DATA. Using 'reject' option, we
 may specify the number or fraction of rejected objects.

 SDDETECT PD returns 'TCLASS' and 'non-TCLASS' decisions (this may be
 changed using 'target' and 'non-target' options).

 EXAMPLES
 Train Gaussian detector on 'banana'. If other classes are present in
 data, use ROC to set threshold. Otherwise, accept all training samples:
   pd=sddetect(a,'banana',sdgauss)

 Train k-NN detector on all samples in a and set its threshold by
 rejecting 1% of samples:
   pd=sddetect(a,'all',sdknn([],'k',7),'reject',0.01)

 Estimate true positive rate and precision in the internally-built ROC:
   pd=sddetect(a,'apple',sdgauss,'measures',{'TPr','apple','precision','apple'})

 SEE ALSO
 SDREJECT, SDGAUSS, SDPARZEN, SDKNN, SDROC

 READ MORE
http://perclass.com/doc/guide/classifiers.html#detector

sddetect is referenced in examples: