Skip to content
Snippets Groups Projects
Commit 8cadc890 authored by Simon Ehrenstein's avatar Simon Ehrenstein
Browse files

Cleanup

parent d836e0f7
No related branches found
No related tags found
No related merge requests found
......@@ -32,4 +32,4 @@ tmp/
.venv
# Python cache files
*.pyc
\ No newline at end of file
*.pyc
......@@ -15,6 +15,5 @@ def compute(directory, filename, warmup_sec, threshold):
Y_pred = linear_regressor.predict(X) # make predictions
trend_slope = linear_regressor.coef_[0][0]
#print(linear_regressor.coef_)
return trend_slope
\ No newline at end of file
# strats:
# default: not end subexp when suitable instances found, increasing the number of instances with each iteration
# H1 end subexp when suitable instances found, increasing the number of instances with each iteration.
# H2 start with suitable instances from experiments for the last lower dim value -> outer loop over dim values, tracking suitable instances
# H3 end subexp when suitable instances found, using binary search.
# 3 Suchstrategien:
# 1. H0 (Teste alle)
# 2. H1 (Lineare Suche)
# 3. H2 (Binäre Suche)
# Optional: Einschränkung des Suchraumes:
# 1. Keine Einschränkung
# 2. Untere Schranke
# Fragen: Erkläre vorgehen, verstehen wir dasselbe?
# Zeithorizont?
# linear regressor besprechen im lag_analysis.py skript
# useful combinations
# Zum Report:
# Gegenüberstellung Suchstrategie & keine Suchstrategie (im Idealfall wdh. von Experimenten)
# The lower bound strategy
def execute(config):
dim_value_index = 0
lower_bound_replicas_index = 0
......
# The strategy where the domain contains all amounts of instances
def execute(config):
dim_value_index = 0
subexperiment_counter = 0
......
# The binary search strategy
import os
from strategies.strategies.config import SubexperimentConfig
......
# Runs subexperiments for all numbers of replicas with an index > lower_replicas_bound_index
# The check_all strategy
import os
from strategies.strategies.config import SubexperimentConfig
......
# Perform linear search to determine the lowest number of replicas which is suitable for the dimension value with an index > lower_replicas_bound_index
# The linear-search strategy
import os
from strategies.strategies.config import SubexperimentConfig
......
def execute(config):
return
\ No newline at end of file
......@@ -26,9 +26,9 @@ search_strategy=sys.argv[10] if len(sys.argv) >= 11 and (sys.argv[10] == "linear
print(f"Domain restriction of search space activated: {domain_restriction}")
print(f"Chosen search strategy: {search_strategy}")
# use h3
# domain restriction
if domain_restriction:
# use h1 & h3
# domain restriction + linear-search
if search_strategy == "linear-search":
print(f"Going to execute at most {len(dim_values)+len(replicas)-1} subexperiments in total..")
experiment_config = ExperimentConfig(
......@@ -44,7 +44,7 @@ if domain_restriction:
search_strategy=linear_search_strategy,
subexperiment_executor=subexperiment_executor,
subexperiment_evaluator=subexperiment_evaluator)
# use h2 & h3
# domain restriction + binary-search
elif search_strategy == "binary-search":
experiment_config = ExperimentConfig(
use_case=uc,
......@@ -59,7 +59,7 @@ if domain_restriction:
search_strategy=binary_search_strategy,
subexperiment_executor=subexperiment_executor,
subexperiment_evaluator=subexperiment_evaluator)
# use h0 & h3
# domain restriction + check_all
else:
print(f"Going to execute {len(dim_values)*len(replicas)} subexperiments in total..")
experiment_config = ExperimentConfig(
......@@ -75,9 +75,9 @@ if domain_restriction:
search_strategy=check_all_strategy,
subexperiment_executor=subexperiment_executor,
subexperiment_evaluator=subexperiment_evaluator)
# not use h3
# no domain restriction
else:
# use h1 & !h3
# no domain restriction + linear-search
if search_strategy == "linear-search":
print(f"Going to execute at most {len(dim_values)+len(replicas)-1} subexperiments in total..")
experiment_config = ExperimentConfig(
......@@ -93,7 +93,7 @@ else:
search_strategy=linear_search_strategy,
subexperiment_executor=subexperiment_executor,
subexperiment_evaluator=subexperiment_evaluator)
# use h2 & !h3
# no domain restriction + binary-search
elif search_strategy == "binary-search":
experiment_config = ExperimentConfig(
use_case=uc,
......@@ -108,7 +108,7 @@ else:
search_strategy=binary_search_strategy,
subexperiment_executor=subexperiment_executor,
subexperiment_evaluator=subexperiment_evaluator)
# use h0 & !h3
# no domain restriction + check_all
else:
print(f"Going to execute {len(dim_values)*len(replicas)} subexperiments in total..")
experiment_config = ExperimentConfig(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment