What about an easy unit test here?
* `loss([1 1 1], [1 1 1]) == 0.0`
* `loss([1 1 1], [1 0 1]) == cost_fn`
* `loss([1 0 1], [1 1 1]) == cost_fp`
* `loss([0 1 0], [0 0 1]) == cost_fp + cost_fn`