Esempio n. 1
0
 def test__init__02(self, array_type):
     input_array = array_type(self.test_data)
     with pytest.raises(ValueError):
         KrigingClass = KrigingModel(input_array)
Esempio n. 2
0
 def test__init__03(self, array_type):
     input_array = array_type(self.test_data)
     with pytest.raises(Exception):
         KrigingClass = KrigingModel(input_array, numerical_gradients=1)
Esempio n. 3
0
 def test_parity_residual_plots(self, mock_show, array_type):
     input_array = array_type(self.training_data)
     KrigingClass = KrigingModel(input_array, regularization=False)
     results = KrigingClass.training()
     KrigingClass.parity_residual_plots()
Esempio n. 4
0
 def test__init__01(self, array_type):
     input_array = array_type(self.test_data)
     KrigingClass = KrigingModel(input_array)
     assert KrigingClass.num_grads == True
     assert KrigingClass.regularization == True
Esempio n. 5
0
 def test_pickle_load01(self, array_type):
     input_array = array_type(self.training_data)
     KrigingClass = KrigingModel(input_array, regularization=False)
     results = KrigingClass.training()
     KrigingClass.pickle_load(KrigingClass.filename)
Esempio n. 6
0
 def test_pickle_load02(self, array_type):
     input_array = array_type(self.training_data)
     KrigingClass = KrigingModel(input_array, regularization=False)
     with pytest.raises(Exception):
         KrigingClass.pickle_load('file_not_existing.pickle')
Esempio n. 7
0
 def test__init__07(self, array_type):
     input_array = array_type(self.test_data)
     with pytest.raises(Exception):
         KrigingClass = KrigingModel(input_array, fname=1)
Esempio n. 8
0
 def test_get_feature_vector_02(self, array_type):
     input_array = array_type(self.training_data)
     KrigingClass = KrigingModel(input_array, regularization=False)
     p = KrigingClass.get_feature_vector()
     expected_dict = {0: 0, 1: 0}
     assert expected_dict == p.extract_values()
Esempio n. 9
0
 def test_get_feature_vector_02(self):
     KrigingClass = KrigingModel(self.training_data, regularization=False)
     p = KrigingClass.get_feature_vector()
     expected_dict = {0: 0, 1: 0}
     assert expected_dict == p.extract_values()
Esempio n. 10
0
 def test__init__04(self, array_type):
     input_array = array_type(self.test_data)
     with pytest.raises(Exception):
         KrigingClass = KrigingModel(input_array, regularization=1)
Esempio n. 11
0
 def test_get_feature_vector_01(self):
     KrigingClass = KrigingModel(self.full_data, regularization=False)
     p = KrigingClass.get_feature_vector()
     expected_dict = {'x1': 0, 'x2': 0}
     assert expected_dict == p.extract_values()
Esempio n. 12
0
 def test__init__05(self):
     with pytest.raises(Exception):
         KrigingClass = KrigingModel(self.test_data_numpy, regularization=1)
Esempio n. 13
0
 def test__init__04(self):
     with pytest.raises(Exception):
         KrigingClass = KrigingModel(self.test_data_numpy,
                                     numerical_gradients=1)
Esempio n. 14
0
 def test__init__03(self):
     with pytest.raises(ValueError):
         KrigingClass = KrigingModel(list(self.test_data_numpy))
Esempio n. 15
0
 def test__init__02(self):
     KrigingClass = KrigingModel(self.test_data_pandas)
     assert KrigingClass.num_grads == True
     assert KrigingClass.regularization == True