Skip to content

Commit

Permalink
added warning (#1588)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaiBe-ctrl authored Jun 20, 2024
1 parent f2fdb2d commit 711b30a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neuralprophet/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ class AR:
ar_layers: Optional[List[int]] = None

def __post_init__(self):
if self.ar_reg is not None and self.n_lags == 0:
raise ValueError("AR regularization is set, but n_lags is 0. Please set n_lags to a positive integer.")
if self.ar_reg is not None and self.ar_reg > 0:
if self.ar_reg < 0:
raise ValueError("regularization must be >= 0")
Expand Down

0 comments on commit 711b30a

Please sign in to comment.