Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
shortened the amount of execution by narrowing the range of experimen…
…ts: irrelevant features range, relevant features range, interaction number range
  • Loading branch information
Tatiana Dembelova committed Oct 17, 2017
1 parent 0421f1a commit 1aa01ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
18 changes: 13 additions & 5 deletions constants.py
Expand Up @@ -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/'
Expand Down
6 changes: 6 additions & 0 deletions main.py
Expand Up @@ -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


Expand Down Expand Up @@ -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))
Expand Down
8 changes: 5 additions & 3 deletions util.py
Expand Up @@ -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) + '_' \
Expand Down

0 comments on commit 1aa01ab

Please sign in to comment.