mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-09 02:48:52 -06:00
Reformat source code with Black; add pre-commit hooks and CI checks
This commit is contained in:
@@ -16,8 +16,10 @@ def test_usage():
|
||||
comp.fit(instances)
|
||||
assert instances[0].lower_bound == 1183.0
|
||||
assert instances[0].upper_bound == 1183.0
|
||||
assert np.round(comp.predict(instances), 2).tolist() == [[1183.0, 1183.0],
|
||||
[1070.0, 1070.0]]
|
||||
assert np.round(comp.predict(instances), 2).tolist() == [
|
||||
[1183.0, 1183.0],
|
||||
[1070.0, 1070.0],
|
||||
]
|
||||
|
||||
|
||||
def test_obj_evaluate():
|
||||
@@ -28,20 +30,20 @@ def test_obj_evaluate():
|
||||
comp.fit(instances)
|
||||
ev = comp.evaluate(instances)
|
||||
assert ev == {
|
||||
'Lower bound': {
|
||||
'Explained variance': 0.0,
|
||||
'Max error': 183.0,
|
||||
'Mean absolute error': 126.5,
|
||||
'Mean squared error': 19194.5,
|
||||
'Median absolute error': 126.5,
|
||||
'R2': -5.012843605607331,
|
||||
"Lower bound": {
|
||||
"Explained variance": 0.0,
|
||||
"Max error": 183.0,
|
||||
"Mean absolute error": 126.5,
|
||||
"Mean squared error": 19194.5,
|
||||
"Median absolute error": 126.5,
|
||||
"R2": -5.012843605607331,
|
||||
},
|
||||
"Upper bound": {
|
||||
"Explained variance": 0.0,
|
||||
"Max error": 183.0,
|
||||
"Mean absolute error": 126.5,
|
||||
"Mean squared error": 19194.5,
|
||||
"Median absolute error": 126.5,
|
||||
"R2": -5.012843605607331,
|
||||
},
|
||||
'Upper bound': {
|
||||
'Explained variance': 0.0,
|
||||
'Max error': 183.0,
|
||||
'Mean absolute error': 126.5,
|
||||
'Mean squared error': 19194.5,
|
||||
'Median absolute error': 126.5,
|
||||
'R2': -5.012843605607331,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user