diff --git a/constants.py b/constants.py index 9b17cf9..a8f79f8 100644 --- a/constants.py +++ b/constants.py @@ -59,15 +59,23 @@ class DistanceMeasure(Enum): # ENVIRONMENT = Environment.TEST # todo change later -IRRELEVANT_FEATURES = 4 if socket.gethostname() != 'push' else 100 -IRRELEVANT_FEATURES_RANGE_LIST = [0, 1, 2, 4, 8, 16, 32, 64, 99, 3, 6, 12, 24, 48, 82] if socket.gethostname() != 'push' else [0, 1, 2, 3] TRIVIAL_BINS_COUNT = 5 +# old settings +IRRELEVANT_FEATURES = 4 if socket.gethostname() != 'push' else 100 + RELEVANT_FEATURES_UPPER_BOUND=3 if socket.gethostname() != 'push' else 31 RELEVANT_FEATURES_LOWER_BOUND=2 -CUBES_UPPER_BOUND=4 if socket.gethostname() != 'push' else 11 -CUBES_LOWER_BOUND=3 if socket.gethostname() != 'push' else 1 -CUBE_TYPES_RANGE_LIST=["c"] if socket.gethostname() != 'push' else ['c', 'i', "io"] + +INTERACTIONS_UPPER_BOUND=4 if socket.gethostname() != 'push' else 11 +INTERACTIONS_LOWER_BOUND=3 if socket.gethostname() != 'push' else 1 + +# new settings (more constrained) +IRRELEVANT_FEATURES_RANGE_LIST = [0, 1, 2, 4, 8, 16, 32, 64, 99, 3, 6, 12, 24, 48, 82] if socket.gethostname() != 'push' else [0, 1, 2, 3] +RELEVANT_FEATURES_RANGE_LIST = [2, 3, 4, 6, 8, 12, 16, 23, 30] if socket.gethostname() == 'push' else [2] +INTERACTION_NUMBER_RANGE_LIST = [1, 2, 4, 8, 10] if socket.gethostname() == 'push' else [3] +INTERACTION_TYPES_RANGE_LIST=["c", 'i', "io"] if socket.gethostname() == 'push' else ['c'] + BASE = '/local/tmp/ipd_extended_experiments2/' if socket.gethostname() == 'push' \ else '/Users/tatyanadembelova/Documents/study/thesis/ipd_extended/' diff --git a/main.py b/main.py index 62d3e3b..14bd5c0 100644 --- a/main.py +++ b/main.py @@ -441,6 +441,9 @@ def compute_predefined_subspace_sets_synchronous_greedy(rel_features, ideal_subs subset.append(ss.copy() + [rel_features + irr_counter]) irr_counter += 1 subspace_sets.append(subset) + + if ideal_subspace_set in subspace_sets: + subspace_sets.remove(ideal_subspace_set) return subspace_sets @@ -747,6 +750,9 @@ def collect(name, rf, c, type): if __name__ == "__main__": + # cubes_03_10_c + # print(compute_predefined_subspace_sets(3, [[0,1,2]])) + # exit(1) params = collect_dataset_params("logs_test3") # print(params) # print(compute_subspace_sets("cubes_10_03_i.csv", cst.Method.PREDEFINED_SUBSPACESETS)) diff --git a/util.py b/util.py index 41f4517..a2b6a3f 100644 --- a/util.py +++ b/util.py @@ -24,11 +24,13 @@ def parse_relevant_features(data_file_name): def collect_params(f): params = [] # relevant features 2 - 30 - for rf in range(cst.RELEVANT_FEATURES_LOWER_BOUND, cst.RELEVANT_FEATURES_UPPER_BOUND): + # for rf in range(cst.RELEVANT_FEATURES_LOWER_BOUND, cst.RELEVANT_FEATURES_UPPER_BOUND): + for rf in cst.RELEVANT_FEATURES_RANGE_LIST: # cubes 1 - 10 - for c in range(cst.CUBES_LOWER_BOUND, cst.CUBES_UPPER_BOUND): + # for c in range(cst.CUBES_LOWER_BOUND, cst.CUBES_UPPER_BOUND): + for c in cst.INTERACTION_NUMBER_RANGE_LIST: # cube types complete, incomplete, incomplete overlapping - for t in cst.CUBE_TYPES_RANGE_LIST: + for t in cst.INTERACTION_TYPES_RANGE_LIST: if (c == 1 or rf / c < 2) and t != 'c': continue dataset_name = 'cubes_' + '{0:02d}'.format(rf) + '_' \