def test_proportion(self): test_data = CsvReader("Tests/Data/datapoints.csv") answers = CsvReader("Tests/Data/answers.csv").data values = Data(test_data, 'value') for column in answers: self.assertEqual(self.statistics.proportion(values), float((column['proportion'])))
def test_confidence_interval_calculator(self): test_data = CsvReader("Tests/Data/datapoints.csv") answers = CsvReader('Tests/Data/answers.csv').data values = Data(test_data, 'value') for column in answers: self.assertEqual(self.statistics.conf_interval(values), (float( column['conf_int_high']), float(column['conf_int_low'])))
def test_psd(self): test_data = CsvReader("Tests/Data/datapoints.csv") answers = CsvReader("Tests/Data/answers.csv").data values = Data(test_data, 'value') for column in answers: self.assertEqual(round(self.statistics.Psd(values), 4), float((column['PSD'])))
def test_vsp(self): test_data = CsvReader("Tests/Data/datapoints.csv") answers = CsvReader("Tests/Data/answers.csv").data values = Data(test_data, 'value') x = self.statistics.vsp(values) self.assertEqual(x, x)
def test_zscore(self): test_data = CsvReader("Tests/Data/datapoints.csv") answers = CsvReader("Tests/Data/answers.csv").data values = Data(test_data, "value")