Tree-AS node - costs

In some contexts, certain kinds of errors are more costly than others. For example, it may be more costly to classify a high-risk credit applicant as low risk (one kind of error) than it is to classify a low-risk applicant as high risk (a different kind of error). Misclassification costs allow you to specify the relative importance of different kinds of prediction errors.

Misclassification costs are basically weights applied to specific outcomes. These weights are factored into the model and may actually change the prediction (as a way of protecting against costly mistakes).

A model that includes costs might not produce fewer errors than one that doesn't, and might not rank any higher in terms of overall accuracy, but it is likely to perform better in practical terms because it has a built-in bias in favor of less expensive errors.

The cost matrix shows the cost for each possible combination of predicted category and actual category. By default, all misclassification costs are set to 1.0. To enter custom cost values, select Use misclassification costs and enter your custom values into the cost matrix.

To change a misclassification cost, select the cell corresponding to the desired combination of predicted and actual values, delete the existing contents of the cell, and enter the desired cost for the cell. Costs are not automatically symmetrical. For example, if you set the cost of misclassifying A as B to be 2.0, the cost of misclassifying B as A will still have the default value of 1.0 unless you explicitly change it as well.

For ordinal targets only, you can select the Default cost increase for ordinal target and set default values in the costs matrix. The available options are described in the following list.

  • No increase - A default value of 1.0 for every correct prediction.
  • Linear - Each successive incorrect prediction increases the cost by 1.
  • Square - Each successive incorrect prediction is the square of the linear value. In this case, the values might be: 1, 4, 9, and so on.
  • Custom - If you manually edit any values in the table, the drop-down option automatically changes to Custom. If you change the drop-down selection to any of the other options your edited values are replaced with the values for the selected option.