Cost Sensitive Classification Walkthrough


  1. Open Weka as normal and go to the "Classify" tab.
  2. Instead of choosing J48 (or any of the standard learners) choose "CostSensitiveClassifier" under the "meta" category. 

  3. Open the classifier's options like any other learner
  4. Use the "Choose" button to pick the learner you wish to use (eg J48)

  5. Next, click where it says "1 x 1 Cost Matrix", this will open a new window where you can edit the cost matrix.
  6. Change the number of classes to 2, and change the costs of type 1 and type 2 errors.  You must press <enter> after typing values in these boxes for the tool to record the changes. 

  7. Close the cost matrix editor, close the CostSensitiveClassifier options by clicking "OK" then run the tool.
  8. Vary the cost ratio by repeating steps 5 through 7 as required by the assignment.