Exemplo n.º 1
0
    def test_target_diagram(self):
        values =           np.array([3, 3, 2, 3, 6, 8, 5, 3, 4, 6, 4, 1, 7, 7, 6])
        reference_values = np.array([2, 5, 1, 5, 5, 9, 4, 5, 3, 8, 3, 3, 6, 9, 5])
        stats = processor.calculate_statistics(model_values=values, reference_values=reference_values, model_name='Linda', unit='g')

        values1 =           np.array([2, 14, 8, 6, 10, 9, 6, 7, 2, 15, 10, 0, 2, 2, 8])
        reference_values1 = np.array([5, 11, 6, 4, 11, 8, 7, 9, 2, 5, 11, -2, 1, 3, 9])
        stats1 = processor.calculate_statistics(model_values=values1, reference_values=reference_values1, model_name='Kate', unit='mg')

        values2 =           np.array([-2, -14, -8, -6, -10, -9, -6, 7, 2, 15, 10, 0, 2, 2, 8])
        reference_values2 = np.array([-1, -10, -5, -5, -11, -8, -7, 5, 3, 13, 10, 2, 2, -1, 7])
        stats2 = processor.calculate_statistics(model_values=values2, reference_values=reference_values2, model_name='Naomi', unit='kg')

     #   print('ref_stddev: %s' % stats['ref_stddev'])
     #   print('stddev: %s' % stats['stddev'])
     #   print('unbiased rmse: %s' % stats['unbiased_rmse'])
     #   print('corrcoeff: %s' % stats['corrcoeff'])

     #   print('ref_stddev: %s' % stats2['ref_stddev'])
     #   print('stddev: %s' % stats2['stddev'])
     #   print('unbiased rmse: %s' % stats2['unbiased_rmse'])
     #   print('corrcoeff: %s' % stats2['corrcoeff'])

        diagram = plotter.create_target_diagram((stats, stats1, stats2))
        diagram.write('resources/target_test.png')
Exemplo n.º 2
0
    def test_target_diagram(self):
        values = np.array([3, 3, 2, 3, 6, 8, 5, 3, 4, 6, 4, 1, 7, 7, 6])
        reference_values = np.array(
            [2, 5, 1, 5, 5, 9, 4, 5, 3, 8, 3, 3, 6, 9, 5])
        stats = processor.calculate_statistics(
            model_values=values,
            reference_values=reference_values,
            model_name='Linda',
            unit='g')

        values1 = np.array([2, 14, 8, 6, 10, 9, 6, 7, 2, 15, 10, 0, 2, 2, 8])
        reference_values1 = np.array(
            [5, 11, 6, 4, 11, 8, 7, 9, 2, 5, 11, -2, 1, 3, 9])
        stats1 = processor.calculate_statistics(
            model_values=values1,
            reference_values=reference_values1,
            model_name='Kate',
            unit='mg')

        values2 = np.array(
            [-2, -14, -8, -6, -10, -9, -6, 7, 2, 15, 10, 0, 2, 2, 8])
        reference_values2 = np.array(
            [-1, -10, -5, -5, -11, -8, -7, 5, 3, 13, 10, 2, 2, -1, 7])
        stats2 = processor.calculate_statistics(
            model_values=values2,
            reference_values=reference_values2,
            model_name='Naomi',
            unit='kg')

        #   print('ref_stddev: %s' % stats['ref_stddev'])
        #   print('stddev: %s' % stats['stddev'])
        #   print('unbiased rmse: %s' % stats['unbiased_rmse'])
        #   print('corrcoeff: %s' % stats['corrcoeff'])

        #   print('ref_stddev: %s' % stats2['ref_stddev'])
        #   print('stddev: %s' % stats2['stddev'])
        #   print('unbiased rmse: %s' % stats2['unbiased_rmse'])
        #   print('corrcoeff: %s' % stats2['corrcoeff'])

        diagram = plotter.create_target_diagram((stats, stats1, stats2))
        diagram.write('resources/target_test.png')
Exemplo n.º 3
0
 def target_diagram(self, statistics, target_file=None):
     target_diagram = plotter.create_target_diagram(statistics, self.config)
     if target_file is not None:
         target_diagram.write(target_file)
     return target_diagram
Exemplo n.º 4
0
 def target_diagram(self, statistics, target_file=None):
     target_diagram = plotter.create_target_diagram(statistics, self.config)
     if target_file is not None:
         target_diagram.write(target_file)
     return target_diagram