Calculate the cost for false positives depending on the chosen cost_fp_constant.

process_cost_fp(cost_fp_constant, gold_vs_pred)

Arguments

cost_fp_constant

Constant cost assigned to false positives. cost_fp_constant must be a numeric value > 0 or one of 'max', 'min', 'mean' (computed with reference to the gold_standard label distribution). Defaults to NULL, i.e. label weights are applied to false positives in the same way as to false negatives and true positives.

gold_vs_pred

A data.frame with logical columns "suggested", "gold" as produced by create_comparison.

Value

A numeric value > 0.