Skip to content

Commit

Permalink
Merge pull request #15 from climateintelligence/bug_fix
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
cehbrecht authored Apr 25, 2024
2 parents 0ecb635 + 99dd774 commit e23f071
Show file tree
Hide file tree
Showing 3 changed files with 884 additions and 874 deletions.
20 changes: 15 additions & 5 deletions hawk/analysis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,24 @@ def run_baseline_analysis(self):

configs = []

# Autoregressive baselines
for i in range(1, self.tefs_max_lag_target):
# 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))}))

# With all features
# All features without AR
configs.append(
(
"All features",
{feature: self.tefs_features_lags for feature in features_names},
{feature: self.tefs_features_lags for feature in features_names if feature != self.target_column_name},
)
)

# All features with AR
configs.append(
(
"All features and AR",
{feature: self.tefs_features_lags if feature != self.target_column_name
else list(range(1, self.tefs_max_lag_target+1)) for feature in features_names},
)
)

Expand Down Expand Up @@ -169,7 +178,7 @@ def run_tefs_analysis(
def run_pcmci_analysis(
self,
):
lag_options = self.pcmci_features_lags # max lag
lag_options = self.pcmci_features_lags # list from 0 to max_lag

# Define the tests
parcorr = ParCorr(significance="analytic")
Expand All @@ -180,6 +189,7 @@ def run_pcmci_analysis(
transform="ranks",
sig_samples=200,
)
# cmiknn = CMIknn()

# Create the dictionary of tests
independence_tests = {
Expand Down
Loading

0 comments on commit e23f071

Please sign in to comment.