def test_cost_sensitive_label(): model = vw(csoaa=4, quiet=True) csl = pyvw.cost_sensitive_label(model.example("2:5 |")) assert csl.costs[0].label == 2 assert csl.costs[0].wap_value == 0.0 assert csl.costs[0].partial_prediction == 0.0 assert csl.costs[0].cost == 5.0 assert str(csl) == "2:5.0" del model
def test_cost_sensitive_label(): model = vw(csoaa=4, quiet=True) assert pyvw.cost_sensitive_label(model.example('1 |')).costs[0].label == 1 del model