Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix #15

Merged
merged 8 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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