-
Notifications
You must be signed in to change notification settings - Fork 17
/
script_eval_noise_feat.py
79 lines (66 loc) · 2.68 KB
/
script_eval_noise_feat.py
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
""" script_eval_noise_feat.py
Evaluation of GraphSVX - filter noisy features
"""
import argparse
import numpy as np
import random
import time
from itertools import product
import torch
import warnings
warnings.filterwarnings("ignore", category=FutureWarning)
import configs
from utils.io_utils import fix_seed
from src.eval_multiclass import filter_useless_features_multiclass
from src.eval import filter_useless_features
def main():
args = configs.arg_parse()
fix_seed(args.seed)
node_indices = None
start_time = time.time()
if args.multiclass == False:
filter_useless_features(args.dataset,
args.model,
args.feat_explainers,
args.hops,
args.num_samples,
args.test_samples,
args.K,
args.prop_noise_feat,
node_indices,
args.info,
args.hv,
args.feat,
args.coal,
args.g,
args.multiclass,
args.regu,
args.gpu,
args.fullempty,
args.S,
args.seed)
else:
filter_useless_features_multiclass(args.dataset,
args.model,
args.feat_explainers,
args.hops,
args.num_samples,
args.test_samples,
args.prop_noise_feat,
node_indices,
5,
args.info,
args.hv,
args.feat,
args.coal,
args.g,
args.multiclass,
args.regu,
args.gpu,
args.fullempty,
args.S,
args.seed)
end_time = time.time()
print('Time: ', end_time - start_time)
if __name__ == "__main__":
main()