Exemplo n.º 1
0
 def test_create_FCE_from_summary_values(self):
     ERT, FCE, std_dev_ERT, std_dev_FCE = ESFitness._calcFCEandERT(
         min_fitnesses=[1, 2, 42, 3, 4],
         min_indices=[999, 999, 999, 999, 999],
         num_successful=0)
     self.assertIsNone(ERT)
     self.assertAlmostEqual(std_dev_ERT, 0)
     self.assertAlmostEqual(FCE, 10.4)
     self.assertAlmostEqual(std_dev_FCE, 15.83161394173)
Exemplo n.º 2
0
 def test_create_both_from_summary_values(self):
     ERT, FCE, std_dev_ERT, std_dev_FCE = ESFitness._calcFCEandERT(
         min_fitnesses=[0, 0, 40, 0, 0],
         min_indices=[32, 48, 999, 16, 64],
         num_successful=4)
     self.assertAlmostEqual(ERT, 289.75)
     self.assertAlmostEqual(std_dev_ERT, 383.9335359147)
     self.assertAlmostEqual(FCE, 8)
     self.assertAlmostEqual(std_dev_FCE, 16)