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:

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.