Beispiel #1
0
    def setup_method(self, method):
        self.test_dict = {
            'one': {
                'A': np.array([10.])
            },
            'two': {
                'centre':
                np.array([0., 1.]),
                'sigma':
                np.array([
                    -3., 0., 3., 1., 1.5, 2., 3.0, 3.05, 3.1, 3.15, 4., 4., 5.,
                    17., 30.
                ])
            }
        }

        self.test_database = {
            'one': {
                'A': None
            },
            'two': {
                'centre': None,
                'sigma': None
            }
        }

        self.test_database['one']['A'] = np.histogram(
            self.test_dict['one']['A'], 10)
        self.test_database['two']['centre'] = np.histogram(
            self.test_dict['two']['centre'], 10)
        self.test_database['two']['sigma'] = histogram(
            self.test_dict['two']['sigma'], 'blocks')
        self.s = HistogramSegmenter()
Beispiel #2
0
 def __init__(self, bins='freedman'):
     super().__init__('Histogram global strategy')
     self.segmenter = HistogramSegmenter(bins)