Research Article

Tuning Expert Systems for Cost-Sensitive Decisions

Algorithm 1

Expert system tuning algorithm.
Expert_System_Tuning ( , , , )
Input:
: An expert system. Given the input vector of a problem case, suggests a CF value. By
 default, the expert system makes a positive classification decision if the CF is positive and a
 negative classification decision, otherwise.
: A sample of solved cases , each of which is a pair , where
and . In addition, let denote the CF value suggested
 by the expert system for the case .
: Cost ratio. .
: Prior probability of the positive class.
Output: A tuned cutoff for the CF value.
BEGIN
:= := 0.
 FOR   := 1 TO ,
  Classify using the expert system, that is,   := .
  IF , THEN
      := + 1.
  ELSE
      := + 1.
 Sort the cases in on the CF value in ascending order.
:= .
 FOR   := 0 TO ,
  IF , THEN
        := := −1.
  ELSE IF   , THEN
        := .
        := .
  ELSE
     := := 1.
  IF , THEN
        := ; := 0;
  ELSE IF , THEN
        := + 1.
  ELSE
     := – 1.
  Assuming the cutoff of , compute the expected misclassification cost as
   .
  IF , THEN
     := ; := ; := .
 RETURN .
END.