Commit e9409ea3 authored by Le Roux Erwan's avatar Le Roux Erwan
Browse files

[contrasting] add aic test in abstract_gev_trend_test.py

parent 220ade60
No related merge requests found
Showing with 4 additions and 1 deletion
+4 -1
from math import ceil, floor
import numpy.testing as npt
import matplotlib.pyplot as plt
import numpy as np
......@@ -113,7 +114,9 @@ class AbstractGevTrendTest(object):
@property
def aic(self):
aic = 2 * self.total_number_of_parameters_for_unconstrained_model + self.unconstrained_model_deviance
assert np.equal(self.unconstrained_estimator.result_from_model_fit.aic, aic)
assert np.equal(self.total_number_of_parameters_for_unconstrained_model, self.unconstrained_estimator.margin_model.nb_params)
npt.assert_almost_equal(self.unconstrained_estimator.result_from_model_fit.aic, aic, decimal=12)
npt.assert_almost_equal(self.unconstrained_estimator.aic(), aic, decimal=12)
return aic
@property
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment