diff --git a/experiment/trend_analysis/univariate_test/abstract_trend_test.py b/experiment/trend_analysis/univariate_test/abstract_trend_test.py index 195d685f8b6c43b236cda26200e70bb079d1784a..9304b779d4a9641cef1c7933c7489bc43f2cef63 100644 --- a/experiment/trend_analysis/univariate_test/abstract_trend_test.py +++ b/experiment/trend_analysis/univariate_test/abstract_trend_test.py @@ -1,13 +1,8 @@ -import random import warnings -import matplotlib.pyplot as plt -from collections import OrderedDict - import numpy as np -from cached_property import cached_property -from experiment.trend_analysis.mann_kendall_test import mann_kendall_test +from experiment.trend_analysis.univariate_test.mann_kendall_test import mann_kendall_test from experiment.trend_analysis.abstract_score import MannKendall from experiment.trend_analysis.univariate_test.abstract_univariate_test import AbstractUnivariateTest diff --git a/experiment/trend_analysis/univariate_test/abstract_univariate_test.py b/experiment/trend_analysis/univariate_test/abstract_univariate_test.py index 1376addeac92f0f693e24ed172f74e1227908c49..a039b9d97ad619e30cdef0acde7cd906fbc68c5f 100644 --- a/experiment/trend_analysis/univariate_test/abstract_univariate_test.py +++ b/experiment/trend_analysis/univariate_test/abstract_univariate_test.py @@ -1,16 +1,10 @@ import random -import warnings - -import matplotlib.pyplot as plt from collections import OrderedDict -import numpy as np +import matplotlib.pyplot as plt from cached_property import cached_property from matplotlib import colors -from experiment.trend_analysis.mann_kendall_test import mann_kendall_test -from experiment.trend_analysis.abstract_score import MannKendall - class AbstractUnivariateTest(object): SIGNIFICATIVE = 'significative' diff --git a/experiment/trend_analysis/mann_kendall_test.py b/experiment/trend_analysis/univariate_test/mann_kendall_test.py similarity index 100% rename from experiment/trend_analysis/mann_kendall_test.py rename to experiment/trend_analysis/univariate_test/mann_kendall_test.py diff --git a/extreme_estimator/estimator/abstract_estimator.py b/extreme_estimator/estimator/abstract_estimator.py index 857fef72b9d33d0f060412f036aba0f80a6ff04f..73f453ea69163df41f06ce3f0e73c3e8c98dce1a 100644 --- a/extreme_estimator/estimator/abstract_estimator.py +++ b/extreme_estimator/estimator/abstract_estimator.py @@ -58,11 +58,6 @@ class AbstractEstimator(object): coef_dict=self.result_from_fit.margin_coef_dict, starting_point=margin_model.starting_point) - # @property - # def max_stable_fitted(self) -> AbstractMarginFunction: - # assert self._margin_function_fitted is not None, 'Error: estimator has not been fitted' - # return self._margin_function_fitted - @property def train_split(self): return self.dataset.train_split diff --git a/extreme_estimator/estimator/margin_estimator/abstract_margin_estimator.py b/extreme_estimator/estimator/margin_estimator/abstract_margin_estimator.py index 8a747fde45f0cbab5501c296d6761140fa4ab68e..220d4b5703ed0d2762536e39a352dd8e0ec214ea 100644 --- a/extreme_estimator/estimator/margin_estimator/abstract_margin_estimator.py +++ b/extreme_estimator/estimator/margin_estimator/abstract_margin_estimator.py @@ -39,7 +39,9 @@ class LinearMarginEstimator(AbstractMarginEstimator): @property def margin_function_fitted(self) -> LinearMarginFunction: - return super().margin_function_fitted + margin_function_fitted = super().margin_function_fitted + assert isinstance(margin_function_fitted, LinearMarginFunction) + return margin_function_fitted def extract_function_fitted(self) -> LinearMarginFunction: return self.extract_function_fitted_from_the_model_shape(self.margin_model)