-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_feature_matrix.py
More file actions
25 lines (17 loc) · 991 Bytes
/
test_feature_matrix.py
File metadata and controls
25 lines (17 loc) · 991 Bytes
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
import config
import features
def test_generator():
for p in config.PROBLEMS: # + config.MZNC1617_PROBLEMS:
yield get_features, p
def get_features(problem):
features.cached_feature_matrix(problem, include_opt=True, include_mzn2feat=True)
features.cached_feature_matrix(problem, include_opt=True, include_mzn2feat=False)
#tts = data_loader.get_train_test_split(problem)
#for ds_id in range(5):
# X_train, y_train = features.cached_feature_matrix(problem, dzns=tts[ds_id]['train'], include_opt=True)
# X_test, y_test = features.cached_feature_matrix(problem, dzns=tts[ds_id]['test'], include_opt=True)
# X_train, y_train = features.cached_feature_matrix(problem, dzns=tts[ds_id]['train'], include_opt=True, include_mzn2feat=True)
# X_test, y_test = features.cached_feature_matrix(problem, dzns=tts[ds_id]['test'], include_opt=True, include_mzn2feat=True)
if __name__ == '__main__':
for f, p in test_generator():
f(p)