Skip to content

Commit

Permalink
[Bug-fix] Refactor warning about global normalization to forecaster.py (
Browse files Browse the repository at this point in the history
  • Loading branch information
judussoari authored Jan 13, 2023
1 parent ebbe06a commit 05d5e10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions neuralprophet/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,9 @@ def fit(
log.warning("Progress plot requires metrics to be enabled. Enabling the default metrics.")
metrics = metrics.get_metrics(True)

if not self.config_normalization.global_normalization:
log.warning("When Global modeling with local normalization, metrics are displayed in normalized scale.")

if minimal:
checkpointing = False
self.metrics = False
Expand Down
4 changes: 1 addition & 3 deletions neuralprophet/time_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -1290,9 +1290,7 @@ def denormalize(self, ts):
-------
denormalized timeseries
"""
if not self.config_normalization.global_normalization:
log.warning("When Global modeling with local normalization, metrics are displayed in normalized scale.")
else:
if self.config_normalization.global_normalization:
shift_y = (
self.config_normalization.global_data_params["y"].shift
if self.config_normalization.global_normalization and not self.config_normalization.normalize == "off"
Expand Down

0 comments on commit 05d5e10

Please sign in to comment.