How to configure cost matrix for MetaCost operator
I am struggling with correctly setting up a cost matrix for the MetaCost operator. The documentation on it is quite sparse and even after reading many posts on this forum, I cannot find my answer. I also
Here is the cost matrix for the default tutorial process for the MetaCost operator (distinguishing mines from rocks in the Sonar dataset):
Class 1 is Rock; Class 2 is Mine.
That image refers to the Matlab cost matrix format (which I think is here: https://www.mathworks.com/help/stats/classification-with-unequal-misclassification-costs.html), but I still have many questions:
- I assume that the 2.0 and 3.0 are costs (penalties) for misclassification, since they are for wrong predictions. The Matlab instructions say that the true positive (TP) and true negative (TN) diagonal is supposed to be left at 0, but this does not make sense to me if I have benefits. Would they not be negative (opposite of costs) in that case?
Here is what I would think:
That is, with "yes" as the positive class:
- True positive: earns 45€, so cost is -45
- True negative: we spend nothing and gain nothing, so cost is 0
- False positive: we spent 5€ to call a customer but gained nothing, so cost is 5
- False negative: we spent nothing, but missed the opportunity of receiving 45€ profit, so cost is 45
So, I would appreciate clear guidance on how to correctly configure the cost matrix.