diff --git a/examples/run_automl.py b/examples/run_automl.py index a144f31..dd54b7c 100644 --- a/examples/run_automl.py +++ b/examples/run_automl.py @@ -13,6 +13,7 @@ table_path = 'datasets/yahoo_sub_5.csv' target_index = 6 # what column is the target #table_path = 'datasets/NAB/realTweets/labeled_Twitter_volume_IBM.csv' # The path of the dataset time_limit = 30 # How many seconds you wanna search + #metric = 'F1' # F1 on label 1 metric = 'F1_MACRO' # F1 on both label 0 and 1 @@ -21,7 +22,7 @@ df = pd.read_csv(table_path) dataset, problem_description = generate_dataset_problem(df, target_index=target_index, metric=metric) # Start backend -backend = SimpleRunner(random_seed=0) +backend = SimpleRunner(random_seed=42) # Start search algorithm search = BruteForceSearch(problem_description=problem_description, backend=backend) diff --git a/tods/searcher/search/brute_force_search.py b/tods/searcher/search/brute_force_search.py index ac875e1..b5db6ec 100644 --- a/tods/searcher/search/brute_force_search.py +++ b/tods/searcher/search/brute_force_search.py @@ -148,7 +148,8 @@ primitive_python_paths = { #'d3m.primitives.tods.detection_algorithm.KDiscordODetector', #'d3m.primitives.tods.detection_algorithm.deeplog', #'d3m.primitives.tods.detection_algorithm.telemanom', - ] + ], + 'contamination': [0.01, 0.02, 0.05, 0.07, 0.1, 0.15, 0.2], } @@ -233,6 +234,7 @@ def _generate_pipline(combinations): tods_step_6= PrimitiveStep(primitive=index.get_primitive(combination[2])) tods_step_6.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.5.produce') tods_step_6.add_output('produce') + tods_step_6.add_hyperparameter(name='contamination', argument_type=ArgumentType.VALUE, data=combination[3]) pipeline_description.add_step(tods_step_6) #tods_step_7 = PrimitiveStep(primitive=index.get_primitive(combination[3])) @@ -267,7 +269,7 @@ def _generate_pipelines(primitive_python_paths, cpu_count=40): import multiprocessing as mp #components = ['data_processing', 'timeseries_processing', 'feature_analysis', 'detection_algorithm'] - components = ['timeseries_processing', 'feature_analysis', 'detection_algorithm'] + components = ['timeseries_processing', 'feature_analysis', 'detection_algorithm', 'contamination'] combinations = itertools.product(*(primitive_python_paths[k] for k in components))