Exemple #1
0
 def test_covariance_inverse_generator_02(self, array_type):
     input_array = array_type(self.training_data)
     KrigingClass = KrigingModel(input_array[0:3], regularization=True)
     cov_matrix = np.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
     inverse_x = KrigingClass.covariance_inverse_generator(cov_matrix)
     np.testing.assert_array_equal(np.round(inverse_x, 7),
                                   np.round(cov_matrix, 7))
Exemple #2
0
    def test_covariance_inverse_generator_01(self, array_type):
        input_array = array_type(self.training_data)
        KrigingClass = KrigingModel(input_array[0:3], regularization=True)
        cov_matrix = np.array([[1.000001, 0.60653066, 0.13533528],
                               [0.60653066, 1.000001, 0.60653066],
                               [0.13533528, 0.60653066, 1.000001]])
        cov_matrix_inv_exp = np.array([[1.82957788, -1.51792604, 0.67306158],
                                       [-1.51792604, 2.84133453, -1.51792604],
                                       [0.67306158, -1.51792604, 1.82957788]])

        inverse_x = KrigingClass.covariance_inverse_generator(cov_matrix)
        np.testing.assert_array_equal(np.round(inverse_x, 7), np.round(cov_matrix_inv_exp, 7))