(seed, pollution_percentage=0.2, n=1, anomaly_percentage=0.023)
return dataset
Full pollution -> All anomalies from test set are in train set
Full pollution -> All anomalies from test set are in train set
Full pollution - > All anomalies from test set are in train set
def extreme_1_polluted(seed, pollution_percentage=0.2, n=1, anomaly_percentage=0.023):
        """Full pollution -> All anomalies from test set are in train set"""
        np.random.seed(seed)
        dataset = SyntheticDataGenerator.extreme_1(seed, n, anomaly_percentage=anomaly_percentage)

        train_size = int(dataset.length * dataset.train_split)
        timestamps = [(t,) for t in np.random.randint(0, train_size, int(pollution_percentage * train_size))]

        dim = np.random.choice(n, len(timestamps))
        pollution_config = {'extreme': [{'n': i, 'timestamps':
            [ts for d, ts in zip(dim, timestamps) if d == i]} for i in range(n)]}
        dataset.pollution_config = pollution_config

        dataset.name = f'Syn Extreme Outliers (pol={pollution_percentage}, anom={anomaly_percentage})'
        return dataset
def extreme_1_polluted ( seed , pollution_percentage = 0.2 , n = 1 , anomaly_percentage = 0.023 ) : np . random . seed ( seed ) dataset = SyntheticDataGenerator . extreme_1 ( seed , n , anomaly_percentage = anomaly_percentage ) train_size = int ( dataset . length * dataset . train_split ) timestamps = [ ( t , ) for t in np . random . randint ( 0 , train_size , int ( pollution_percentage * train_size ) ) ] dim = np . random . choice ( n , len ( timestamps ) ) pollution_config = { 'extreme' : [ { 'n' : i , 'timestamps' : [ ts for d , ts in zip ( dim , timestamps ) if d == i ] } for i in range ( n ) ] } dataset . pollution_config = pollution_config dataset . name = f'Syn Extreme Outliers (pol={pollution_percentage}, anom={anomaly_percentage})' return dataset