Exemplo n.º 1
0
 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"
Exemplo n.º 2
0
 def test_target_not_exist(self, titanic_data):
     with pytest.raises(ValueError):
         _ = _check_target(target="survived", df=titanic_data)
Exemplo n.º 3
0
 def test_target_multi_class_outbound(self, otto_data):
     with pytest.raises(ValueError):
         _ = _check_target(target=["target_9"], df=otto_data)
Exemplo n.º 4
0
 def test_target_multi_class_not_exist(self, otto_data):
     with pytest.raises(ValueError):
         _ = _check_target(target=["target"], df=otto_data)
Exemplo n.º 5
0
 def test_target_regression(self, ross_data):
     target_type = _check_target(target="Sales", df=ross_data)
     assert target_type == "regression"
Exemplo n.º 6
0
 def test_target_binary(self, titanic_data):
     target_type = _check_target(target="Survived", df=titanic_data)
     assert target_type == "binary"
Exemplo n.º 7
0
 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'
Exemplo n.º 8
0
 def test_target_regression(self, ross_data):
     target_type = _check_target(target='Sales', df=ross_data)
     assert target_type == 'regression'
Exemplo n.º 9
0
 def test_target_binary(self, titanic_data):
     target_type = _check_target(target='Survived', df=titanic_data)
     assert target_type == 'binary'