Home > Testing and Tuning Models > Testing Classification Models > Test Metrics for Classifica... > Performance > Cost
In a classification problem, it may be important to specify the costs involved in making an incorrect decision. By doing so, it can be useful when the costs of different misclassifications vary significantly.
For example, suppose the problem is to predict whether a user is likely to respond to a promotional mailing. The target has two categories: YES (the customer responds) and NO (the customer does not respond). Suppose a positive response to the promotion generates $500 and that it costs $5 to do the mailing. Then, the scenarios are:
If the model predicts YES, and the actual value is YES, then the cost of misclassification is $0.
If the model predicts YES, and the actual value is NO, then the cost of misclassification is $5.
If the model predicts NO, and the actual value is YES, then the cost of misclassification is $500.
If the model predicts NO, and the actual value is NO, then the cost of misclassification is $0.
Algorithms for classification use the cost matrix during scoring to propose the least expensive solution.If you do not specify a cost matrix, then all misclassifications are counted as equally important.
If you are building an SVM model, then you specify costs using model weights instead of a cost matrix.