PRTools contents

PRTools manual

costm

COSTM

Cost mapping, classification using costs

    Y = COSTM(X,C,LABLIST)
    W = 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

See also

mappings, classc, testd, testcost, setcost,

PRTools contents

PRTools manual