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

[TREND ANALYSIS] few refactoring of the code

parent c65c222c
No related merge requests found
Showing with 5 additions and 19 deletions
+5 -19
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
......
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'
......
......@@ -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
......
......@@ -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)
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