Creates a cost measure for non-standard classification error costs.
makeCostMeasure(id = "costs", minimize = TRUE, costs, combine = mean,
best = NULL, worst = NULL, name = id, note = "")
Arguments
| id |
(character(1))
Name of measure.
Default is “costs”. |
| minimize |
(logical(1))
Should the measure be minimized?
Otherwise you are effectively specifying a benefits matrix.
Default is TRUE. |
| costs |
(matrix)
Matrix of misclassification costs. Rows and columns have to be named with class labels, order does not matter.
Rows indicate true classes, columns predicted classes. |
| combine |
(function)
How to combine costs over all cases for a SINGLE test set?
Note this is not the same as the aggregate argument in makeMeasure
You can set this as well via setAggregation, as for any measure.
Default is mean. |
| best |
(`numeric(1)`)
Best obtainable value for measure.
Default is -`Inf` or `Inf`, depending on `minimize`. |
| worst |
(`numeric(1)`)
Worst obtainable value for measure.
Default is `Inf` or -`Inf`, depending on `minimize`. |
| name |
([character])
Name of the measure. Default is `id`. |
| note |
([character])
Description and additional notes for the measure. Default is “”. |
Value
Measure.
See also