Skip to content

Commit

Permalink
fixing no_lag test
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloBonettiPolimi authored Apr 16, 2024
1 parent de95743 commit feee7fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_causal_analysis_noLag.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_content(response):
# assert 'GitHub' in BeautifulSoup(response.content).title.string


def test_causal_analysis():
def test_causal_analysis_noLag():
df_train = pd.read_csv("hawk/demo/Ticino_train.csv", header=0)
df_test = pd.read_csv("hawk/demo/Ticino_test.csv", header=0)
target_column_name = "target"
Expand All @@ -41,6 +41,14 @@ def test_causal_analysis():
tefs_max_lag_target = 1
workdir = "tests/output"

if str(tefs_max_lag_features) == "no_lag":
tefs_max_lag_features = 0
else:
tefs_max_lag_features = int(tefs_max_lag_features)

if not tefs_use_contemporary_features and tefs_max_lag_features == 0:
raise ValueError("You cannot use no lag features and not use contemporary features in TEFS.")

causal_analysis = CausalAnalysis(
df_train,
df_test,
Expand Down

0 comments on commit feee7fc

Please sign in to comment.