def test_target_multi_class(self, otto_data): target_list = [ "target_0", "target_1", "target_2", "target_3", "target_4", "target_5", "target_6", "target_7", "target_8", ] target_type = _check_target(target=target_list, df=otto_data) assert target_type == "multi-class"
def test_target_not_exist(self, titanic_data): with pytest.raises(ValueError): _ = _check_target(target="survived", df=titanic_data)
def test_target_multi_class_outbound(self, otto_data): with pytest.raises(ValueError): _ = _check_target(target=["target_9"], df=otto_data)
def test_target_multi_class_not_exist(self, otto_data): with pytest.raises(ValueError): _ = _check_target(target=["target"], df=otto_data)
def test_target_regression(self, ross_data): target_type = _check_target(target="Sales", df=ross_data) assert target_type == "regression"
def test_target_binary(self, titanic_data): target_type = _check_target(target="Survived", df=titanic_data) assert target_type == "binary"
def test_target_multi_class(self, otto_data): target_list = ['target_0', 'target_1', 'target_2', 'target_3', 'target_4', 'target_5', 'target_6', 'target_7', 'target_8'] target_type = _check_target(target=target_list, df=otto_data) assert target_type == 'multi-class'
def test_target_regression(self, ross_data): target_type = _check_target(target='Sales', df=ross_data) assert target_type == 'regression'
def test_target_binary(self, titanic_data): target_type = _check_target(target='Survived', df=titanic_data) assert target_type == 'binary'