summaryrefslogtreecommitdiff
path: root/bin/test.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-02-01 15:55:45 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-02-01 15:55:45 +0100
commit7dd98ebe0f52c85fd0e8f016b9a6d1ae4e932594 (patch)
treec22d82efbe019b9ea00af443af1aeb7f59fc1f07 /bin/test.py
parentd5a256640e60c7ed3211c57e3a22bf47af5dfc43 (diff)
move parameter influence detection to newly introduced ParamStat class
Diffstat (limited to 'bin/test.py')
-rwxr-xr-xbin/test.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/test.py b/bin/test.py
index 433b423..0b015f4 100755
--- a/bin/test.py
+++ b/bin/test.py
@@ -43,18 +43,18 @@ class TestStaticModel(unittest.TestCase):
self.assertAlmostEqual(static_model('stopListening', 'duration'), 260, places=0)
self.assertAlmostEqual(static_model('write_nb', 'duration'), 510, places=0)
- self.assertAlmostEqual(model.param_dependence_ratio('POWERDOWN', 'power', 'datarate'), 0, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('POWERDOWN', 'power', 'txbytes'), 0, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('POWERDOWN', 'power', 'txpower'), 0, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('RX', 'power', 'datarate'), 0.99, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('RX', 'power', 'txbytes'), 0, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('RX', 'power', 'txpower'), 0.01, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('STANDBY1', 'power', 'datarate'), 0.04, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('STANDBY1', 'power', 'txbytes'), 0.35, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('STANDBY1', 'power', 'txpower'), 0.32, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('TX', 'power', 'datarate'), 1, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('TX', 'power', 'txbytes'), 0.09, places=2)
- self.assertAlmostEqual(model.param_dependence_ratio('TX', 'power', 'txpower'), 1, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('POWERDOWN', 'power', 'datarate'), 0, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('POWERDOWN', 'power', 'txbytes'), 0, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('POWERDOWN', 'power', 'txpower'), 0, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('RX', 'power', 'datarate'), 0.99, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('RX', 'power', 'txbytes'), 0, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('RX', 'power', 'txpower'), 0.01, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('STANDBY1', 'power', 'datarate'), 0.04, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('STANDBY1', 'power', 'txbytes'), 0.35, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('STANDBY1', 'power', 'txpower'), 0.32, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('TX', 'power', 'datarate'), 1, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('TX', 'power', 'txbytes'), 0.09, places=2)
+ self.assertAlmostEqual(model.stats.param_dependence_ratio('TX', 'power', 'txpower'), 1, places=2)
param_model, param_info = model.get_fitted()
self.assertEqual(param_info('POWERDOWN', 'power'), None)