Ejemplo n.º 1
0
    def _evaluate_prior_data(self, data_series, samples):
        self.logger.debug("Data series: %s" % data_series)
        number_of_samples = len(data_series)

        if number_of_samples == 0:
            return False
        if (number_of_samples < samples):
            self.logger.debug("Only %s samples, ignoring" % number_of_samples)
            return False

        return SteadyState.steady_state(data_series)
Ejemplo n.º 2
0
 def test_negative_slope(self):
     expected = False
     data_series = [[1.3, 1], [1.2, 1], [1.1, 1.1], [1.0, 1.1]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 3
0
 def test_negative_values(self):
     expected = True
     data_series = [[-1, -24.2], [0.5, -23.8], [1.1, -24.0], [3.2, -24.0]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 4
0
 def test_out_of_order_series(self):
     expected = True
     data_series = [[-15, 0.43], [-16, 0.41], [-3, 0.45], [4, 0.42]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 5
0
 def test_empty_series(self):
     expected = False
     data_series = []
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 6
0
 def test_float_integer_mix_true(self):
     expected = True
     data_series = [[12, 18], [12.5, 18.2], [13, 16.8], [15, 16.8]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 7
0
 def test_float_integer_mix_false(self):
     expected = False
     data_series = [[1, 2], [2, 2.2], [3, 1.8], [4, 1.8]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 8
0
 def test_float_values(self):
     expected = True
     data_series = [[55.5, 40.5], [150.2, 42.3], [150.8, 41.8],
                    [151.2, 41.5]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)
Ejemplo n.º 9
0
 def test_integer_values(self):
     expected = True
     data_series = [[305, 20], [306, 21], [307, 21], [308, 19]]
     actual = SteadyState.steady_state(data_series)
     self.assertEqual(expected, actual)