Skip to content

Commit 2fb344a

Browse files
committed
fix plotting issue with some scikit-learn models
1 parent c3df3eb commit 2fb344a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

causalpy/skl_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ScikitLearnModel:
3030

3131
def calculate_impact(self, y_true, y_pred):
3232
"""Calculate the causal impact of the intervention."""
33-
return y_true - y_pred
33+
return y_true - np.squeeze(y_pred)
3434

3535
def calculate_cumulative_impact(self, impact):
3636
"""Calculate the cumulative impact intervention."""

0 commit comments

Comments
 (0)