perClass Documentation
version 5.4 (7-Dec-2018)
 SETCUROP  Set current operating point in the ROC object

    [R,IND]=SETCUROP(R,IND)
    [R,IND]=SETCUROP(R,'min',MEASURE)
    [R,IND]=SETCUROP(R,'max',MEASURE)

 Cost-sensitive optimization
    [R,IND]=SETCUROP(R,'cost',M)

 Combine constraining and setting op.point (see full example below)
    [R,IND]=setcurop(R,'constrain','TPr(banana)',0.8,'min','FPr(banana)')

 INPUT
    R         SDROC object
    IND       Index of operating point to be set
    MEASURE   Measure specification (index or name i.e. 'err(apple)')
    M         Cost matrix (R must store confusion matrices i.e. be created with
              'confmat' option)

 OUTPUT
    R         SDROC object with the cur.op.point set
    IND       Index of the selected operating point

 DESCRIPTION
 SETCUROP sets the current operating point in the SDROC object R.  The
 operating point may be specifed by its index IND or based on the related
 performance measure value. Any measure may be maximized or minimized.
 SETCUROP may also perform cost-sensitive optimization. When provided with
 the cost matrix M, SETCUROP selects operating points minimizing
 classifier loss function. To perform cost-sensitive optimization, R
 must contain full confusion matrices ('confmat' option).

 SETCUROP allows to directly apply constrain and set an operatin point in
 one command.  In order to do that, use 'constrain' as the first option
 with the name of a measure and numerical value (see syntax of contrain
 method for details).  After, you need to use 'min','max' or 'cost' option
 to fix operating point.

 EXAMPLE
 >> load fruit; b=a(:,[2 3])
 >> p=sdfisher(b)
 >> r=sdroc(b,p,'measures',{'FPr','banana','TPr','banana'}
 >> r=setcurop(r,'constrain','TPr(banana)',0.95','min','FPr(banana)')
 The last command applies constrain and sets op.point directly in full object r

 SEE ALSO
 SDROC, SDLOSS, GETCUROP, CONSTRAIN