PRTools Contents

PRTools User Guide

costm

COSTM

Combiner mapping handling costs in classifications

    Y = COSTM(X,C,LABLIST)
    Y = X*COSTM([],C,LABLIST)
    Y = X*COSTM(C,LABLIST)

Description

Maps the classifier output X (assumed to be posterior probability  estimates) to the cost-outputs, defined by the cost-matrix C

     C(i,j) = cost of misclassifying an object from class i as class j.

Default C is the cost matrix stored in the dataset X.  The order of the classes is defined by LABLIST. When no lablist is  given, the order as given by GETFEATLAB(X) is assumed.  In order to apply this mapping, it is assumed that the dataset X represents posterior class probabilities (i.e. normalized by  classc).

Example(s)

 x = gendatb(100);
 w1 = x*ldc;                  % standard classifier
 C = [0 2; 1 0];              % new cost matrix
 w2 = w1*classc*costm(C);  % classifier using this cost-matrix
 confmat(x*w1)
 confmat(x*w2)

See also

mappings, classc, testd, testcost, setcost,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.