-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_PUB.py
More file actions
37 lines (28 loc) · 1.24 KB
/
run_PUB.py
File metadata and controls
37 lines (28 loc) · 1.24 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
37
"""
Code for "Hao Shen, Mengying Xue, and Zuojun Max Shen (2023),
Data-driven Reliable Faciltiy Location Problem, Management Science, Forthcoming",
Last Revised on Jan 12, 2024
@author: Mengying Xue
"""
## this file is main file for generating the performance in Section 5.1
from DataRelated.DataGenerate import ReadRawTrainDataFromFile, ReadRawTestDataFromFile
from Reliability.test_reliability_PUB import test_Reliability_PUB, test_Reliability_PUB_NoCov
def run_PUB():
## set the network size
num_node = 10
## set the reliability = 1-\beta
beta_lst = [0.1]
## set the number of covairates, 2/5
num_cov_set = [2]
## set the data size
NumDataSet = [500]
for num_data in NumDataSet:
for num_cov in num_cov_set:
for beta_ in beta_lst:
train_data_lst, info = ReadRawTrainDataFromFile(num_node, num_data, num_cov)
test_data = ReadRawTestDataFromFile(num_node, num_cov)
## for covariate data
test_Reliability_PUB(train_data_lst, test_data, info, num_node, num_data, num_cov, beta_)
## for covariate case
test_Reliability_PUB_NoCov(train_data_lst, test_data, info, num_node, num_data, num_cov, beta_)
run_PUB()