From 71752c708862e28a69bf5c1600c8e6dfcb5049f1 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 19 May 2020 18:19:02 +0000 Subject: [PATCH] fixed bug in analysis unit tests Signed-off-by: Arthur Lu --- analysis-master/test_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis-master/test_analysis.py b/analysis-master/test_analysis.py index 8310e2d7..fec6f857 100644 --- a/analysis-master/test_analysis.py +++ b/analysis-master/test_analysis.py @@ -6,7 +6,7 @@ def test_(): y_data_ccd = [1, 5, 7, 8.5, 8.66] assert an.basic_stats(test_data_linear) == {"mean": 5.2, "median": 6.0, "standard-deviation": 2.85657137141714, "variance": 8.16, "minimum": 1.0, "maximum": 9.0} assert an.z_score(3.2, 6, 1.5) == -1.8666666666666665 - assert an.z_normalize(test_data_linear).tolist() == [5.2, 6.0, 2.85657137141714, 8.16, 1.0, 9.0] + assert an.z_normalize([test_data_linear], 0).tolist() == [[0.07537783614444091, 0.22613350843332272, 0.45226701686664544, 0.5276448530110863, 0.6784005252999682]] assert all(isinstance(item, str) for item in an.regression(test_data_linear, y_data_ccu, ["lin"])) == True assert all(isinstance(item, str) for item in an.regression(test_data_linear, y_data_ccd, ["log"])) == True assert all(isinstance(item, str) for item in an.regression(test_data_linear, y_data_ccu, ["exp"])) == True