コード例 #1
0
 def test_mmlhs(self):
     lh = LHC_indivudal(rand_latin_hypercube(10, 2), 2, 1)
     phi1 = lh.mmphi()
     lh_opt = _mmlhs(lh, 20, 20)
     opt_phi = lh_opt.mmphi()
     self.assertTrue(is_latin_hypercube(lh_opt))
     self.assertTrue(opt_phi < phi1)
コード例 #2
0
 def test_mmlhs(self):
     lh = LatinHypercube(rand_latin_hypercube(10,2), 2, 1) 
     phi1 = lh.mmphi()
     lh_opt = _mmlhs(lh, 20, 20)
     opt_phi = lh_opt.mmphi()
     self.assertTrue(is_latin_hypercube(lh_opt))
     self.assertTrue(opt_phi < phi1)
コード例 #3
0
 def test_OptLatinHypercube(self):
     olh = OptLatinHypercube()
     olh.num_samples = 10
     olh.num_parameters = 2
     z = zeros((olh.num_samples, olh.num_parameters))
     for i, row in enumerate(olh):
         z[i, :] = row
     self.assertTrue(is_latin_hypercube(z))
コード例 #4
0
 def test_OptLatinHypercube(self):
     olh = OptLatinHypercube()
     olh.num_sample_points = 10
     olh.num_parameters = 2
     z = zeros((olh.num_sample_points, olh.num_parameters))
     for i,row in enumerate(olh):
         z[i,:] = row
     self.assertTrue(is_latin_hypercube(z))