Skip to content

Commit

Permalink
removed unnecessary test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Beerstabr committed Nov 10, 2023
1 parent 54436a4 commit db5f8ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
21 changes: 0 additions & 21 deletions darts/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,24 +1432,3 @@ def rmsse(
"cannot use RMSSE with periodical signals",
)
return np.sqrt(np.mean(np.square(errors))) / scale


if __name__ == "__main__":
import pandas as pd
from darts import TimeSeries

series = TimeSeries.from_dataframe(
pd.DataFrame(
{
"time": pd.date_range("2018-01-01", "2018-01-10"),
"value": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
}
),
"time",
"value",
)

preds = series + 1

test_mase = mase(series, preds[6:], series[:6], m=1, intersect=True)
print(f"mase: {test_mase}")
4 changes: 2 additions & 2 deletions darts/tests/metrics/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def test_mase(self):
# not supported input
with pytest.raises(ValueError):
metrics.mase(1, 2, 3)

def test_rmsse(self):
insample = self.series_train
test_cases, _ = self.get_test_cases()
Expand Down Expand Up @@ -481,7 +481,7 @@ def test_rmsse(self):
metrics.rmsse([self.series1] * 2, [self.series2] * 2, [insample] * 3)
# not supported input
with pytest.raises(ValueError):
metrics.rmsse(1, 2, 3)
metrics.rmsse(1, 2, 3)

def test_ope(self):
self.helper_test_multivariate_duplication_equality(metrics.ope)
Expand Down

0 comments on commit db5f8ac

Please sign in to comment.