Пример #1
0
 def testInit(self):
     self.assertEqual(self.t.Ymean, {"m1": 1.0, "m2": 1.5})
     self.assertEqual(self.t.Ystd, {"m1": 1.0, "m2": 0.5})
     with self.assertRaises(ValueError):
         StandardizeY(search_space=None,
                      observation_features=None,
                      observation_data=[])
Пример #2
0
 def setUp(self):
     self.obsd1 = ObservationData(
         metric_names=["m1", "m2", "m2"],
         means=np.array([1.0, 2.0, 1.0]),
         covariance=np.array([[1.0, 0.2, 0.4], [0.2, 2.0, 0.8],
                              [0.4, 0.8, 3.0]]),
     )
     self.obsd2 = ObservationData(
         metric_names=["m1", "m1", "m2", "m2"],
         means=np.array([1.0, 1.0, 2.0, 1.0]),
         covariance=np.array([
             [1.0, 0.0, 0.0, 0.0],
             [0.0, 1.0, 0.2, 0.4],
             [0.0, 0.2, 2.0, 0.8],
             [0.0, 0.4, 0.8, 3.0],
         ]),
     )
     self.t = StandardizeY(
         search_space=None,
         observation_features=None,
         observation_data=[self.obsd1, self.obsd2],
     )