Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloBonettiPolimi authored Apr 25, 2024
1 parent 5ecdb24 commit 99dd774
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions hawk/analysis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,12 @@ def run_baseline_analysis(self):

features_names = self.datasets["normal"]["var_names"]

print(f"features_names: {features_names}")

configs = []

# Only autoregressive baselines from 1 to the maximum target lag
for i in range(1, self.tefs_max_lag_target+1):
configs.append((f"AR({i})", {self.target_column_name: list(range(1, i + 1))}))

print(f"AR configs: {configs}")

# All features without AR
configs.append(
(
Expand All @@ -101,8 +97,6 @@ def run_baseline_analysis(self):
)
)

print(f"Full configs: {configs}")

# All features with AR
configs.append(
(
Expand All @@ -112,8 +106,6 @@ def run_baseline_analysis(self):
)
)

print(f"Full configs: {configs}")

for label, inputs_names_lags in configs:
baseline[label] = {
"inputs": inputs_names_lags,
Expand All @@ -125,8 +117,6 @@ def run_baseline_analysis(self):
),
}

print(f"Baselines: {baseline}")

target_file = os.path.join(self.workdir, "baseline.pkl")
save_to_pkl_file(target_file, baseline)

Expand Down Expand Up @@ -172,8 +162,6 @@ def run_tefs_analysis(
}
configurations.append(configuration)

print(f"TEFS configurations: {configurations}")

# Run the analysis
results = []
for config in configurations:
Expand All @@ -185,8 +173,6 @@ def run_tefs_analysis(
)
)

print(f"TEFS results: {results}")

return results

def run_pcmci_analysis(
Expand Down Expand Up @@ -240,8 +226,6 @@ def run_pcmci_analysis(
}
configurations.append(configuration)

print(f'PCMCI configurations: {configurations}')

# Run the analysis
results = []
for config in configurations:
Expand All @@ -252,7 +236,6 @@ def run_pcmci_analysis(
independence_tests=independence_tests,
)
)
print(f"PCMCI+ results: {results}")

return results

Expand Down

0 comments on commit 99dd774

Please sign in to comment.