-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexample.py
More file actions
36 lines (33 loc) · 1.07 KB
/
example.py
File metadata and controls
36 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from SDDObench import *
import numpy as np
from tqdm import tqdm
from bench_config import Config
insts = np.arange(1, 9)
drfs = np.arange(1, 6)
samples = 20
dim = 2
T = 60
P = 20
num_peaks = 8
config={
'severity_h':0.3
} # define your own benchmark configuration
user_config= Config(**config)
if __name__ == "__main__":
for instance in insts:
for dfind in drfs:
lb, ub = get_bound(instance)
x_samp = np.linspace(lb, ub, samples)
x0, x1 = np.meshgrid(x_samp,x_samp)
X = np.column_stack((x0.ravel(), x1.ravel()))
params={'num_instance':instance,
'df_type':dfind,
'num_peaks': num_peaks,
'T': T,
'P': P,
'dim':dim,
'peak_info': None,
'delta_info': None}
for t in tqdm(range(T),desc=f'F:{instance}/8 D:{dfind}/5'):
params.update(x=X,change_count=t)
y,params= sddobench(params,config=user_config)