def test_optimal_mu2(self): conf_file = 'tests/test_datasets/mu.conf' offline = Offline(output_name='Pressure', dformat='point') offline.init_database_from_file(conf_file) mu = offline.optimal_mu(error=offline.loo_error()) expected_mu = np.array([-0.29334384, -0.23120563]) np.testing.assert_array_almost_equal(mu[0], expected_mu)
def test_loo_error(self): conf_file = 'tests/test_datasets/mu.conf' offline = Offline(output_name='Pressure', dformat='point') offline.init_database_from_file(conf_file) error = offline.loo_error() assert error.shape == (4, )
def test_loo_error2(self): conf_file = 'tests/test_datasets/mu.conf' offline = Offline(output_name='Pressure', dformat='point') offline.init_database_from_file(conf_file) max_error = np.max(offline.loo_error()) assert isinstance(max_error, float)