diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-02-25 14:38:46 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-02-25 14:38:46 +0100 |
commit | f96a52a8b8e8e820f462b8f269a261b31a262441 (patch) | |
tree | 0c0d241fed4a9b6c763c46addbcb01b714dbb7f6 /test/test_parameters.py | |
parent | fde97233d5e0bf8d9c357bac48caa8b5ac2c7a82 (diff) |
Adjust ParamStats interface in preparation for decision-tree models
Diffstat (limited to 'test/test_parameters.py')
-rwxr-xr-x | test/test_parameters.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_parameters.py b/test/test_parameters.py index a40ebfe..2141603 100755 --- a/test/test_parameters.py +++ b/test/test_parameters.py @@ -57,10 +57,10 @@ class TestModels(unittest.TestCase): # Fit individual functions for each parameter (only "p_linear" in this case) paramfit = ParallelParamFit() - paramfit.enqueue(("TX", "power", "p_linear"), (stats.by_param, 1, False)) + paramfit.enqueue(("TX", "power"), "p_linear", (stats.by_param, 1, False)) paramfit.fit() - fit_result = paramfit.get_result("TX", "power") + fit_result = paramfit.get_result(("TX", "power")) self.assertEqual(fit_result["p_linear"]["best"], "linear") self.assertEqual("p_mod5" not in fit_result, True) @@ -147,16 +147,16 @@ class TestModels(unittest.TestCase): self.assertEqual(ll_stats.depends_on_param("square_none"), False) paramfit = ParallelParamFit() - paramfit.enqueue(("someKey", "lls", "lin_lin"), (lls_stats.by_param, 0, False)) - paramfit.enqueue(("someKey", "lls", "log_inv"), (lls_stats.by_param, 1, False)) + paramfit.enqueue(("someKey", "lls"), "lin_lin", (lls_stats.by_param, 0, False)) + paramfit.enqueue(("someKey", "lls"), "log_inv", (lls_stats.by_param, 1, False)) paramfit.enqueue( - ("someKey", "lls", "square_none"), (lls_stats.by_param, 2, False) + ("someKey", "lls"), "square_none", (lls_stats.by_param, 2, False) ) - paramfit.enqueue(("someKey", "ll", "lin_lin"), (ll_stats.by_param, 0, False)) - paramfit.enqueue(("someKey", "ll", "log_inv"), (ll_stats.by_param, 1, False)) + paramfit.enqueue(("someKey", "ll"), "lin_lin", (ll_stats.by_param, 0, False)) + paramfit.enqueue(("someKey", "ll"), "log_inv", (ll_stats.by_param, 1, False)) paramfit.fit() - fit_lls = paramfit.get_result("someKey", "lls") + fit_lls = paramfit.get_result(("someKey", "lls")) self.assertEqual(fit_lls["lin_lin"]["best"], "linear") self.assertEqual(fit_lls["log_inv"]["best"], "logarithmic") self.assertEqual(fit_lls["square_none"]["best"], "square") @@ -201,7 +201,7 @@ class TestModels(unittest.TestCase): for i, x in enumerate(X): self.assertAlmostEqual(combined_fit_lls.eval(x), f_lls(x), places=0) - fit_ll = paramfit.get_result("someKey", "ll") + fit_ll = paramfit.get_result(("someKey", "ll")) self.assertEqual(fit_ll["lin_lin"]["best"], "linear") self.assertEqual(fit_ll["log_inv"]["best"], "inverse") self.assertEqual("quare_none" not in fit_ll, True) |