def __init__(self, w_martingale=15, non_conformity="median", k=20, dev_threshold=0.6, ref_group="month"): utils.validate_individual_deviation_params(w_martingale, non_conformity, k, dev_threshold, ref_group) self.w_martingale = w_martingale self.non_conformity = non_conformity self.k = k self.dev_threshold = dev_threshold self.ref_group = ref_group self.strg = Strangeness(non_conformity, k) self.scores = [] self.T, self.S, self.P, self.M = [], [], [], [] self.mart = 0 self.marts = [0, 0, 0] self.df = pd.DataFrame(data=[], index=[]) self.externals = []
def __init__(self, w_martingale=15, non_conformity="median", k=20, dev_threshold=0.6, ref_group=["season-of-year"], external_percentage=0.3, columns=None): utils.validate_individual_deviation_params(w_martingale, non_conformity, k, dev_threshold, ref_group) self.w_martingale = w_martingale self.non_conformity = non_conformity self.k = k self.dev_threshold = dev_threshold self.ref_group = ref_group self.external_percentage = external_percentage self.columns = columns self.strg = get_strangeness(non_conformity, k) self.T, self.S, self.P, self.M = [], [], [], [] self.representatives, self.diffs = [], [] self.mart = 0 self.marts = [0, 0, 0] self.df = pd.DataFrame(index=[], data=[]) self.externals = [] self.df_init = pd.DataFrame(index=[], data=[]) self.externals_init = []
def __init__(self, w_martingale=15, non_conformity="median", k=20, dev_threshold=0.6, columns=None): utils.validate_individual_deviation_params(w_martingale, non_conformity, k, dev_threshold) self.w_martingale = w_martingale self.non_conformity = non_conformity self.k = k self.dev_threshold = dev_threshold self.columns = columns self.strg = get_strangeness(non_conformity, k) self.T, self.S, self.P, self.M = [], [], [], [] self.representatives, self.diffs = [], [] self.mart = 0 self.marts = [0, 0, 0] self.history_data = []