Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] NaiveEnsembleModel predictions have wrong component names #1601

Closed
DavidKleindienst opened this issue Feb 28, 2023 · 0 comments · Fixed by #1602
Closed

[BUG] NaiveEnsembleModel predictions have wrong component names #1601

DavidKleindienst opened this issue Feb 28, 2023 · 0 comments · Fixed by #1602
Labels
bug Something isn't working triage Issue waiting for triaging

Comments

@DavidKleindienst
Copy link
Contributor

Describe the bug
Predictions should have the same component names as the TimeSeries used to fit the model.
For NaiveEnsembleModel.predict that's not the case - The component of the returned TimeSeries is always called "0"

To Reproduce

import pandas as pd
import numpy as np
from darts import TimeSeries
from darts.models import NaiveEnsembleModel, NaiveMean

dates = pd.date_range("2020-01-01", "2020-12-31", freq = "D")
nr_dates = len(dates)
ts=TimeSeries.from_times_and_values(dates, 3*np.ones(nr_dates), columns=["TS"])
model = NaiveEnsembleModel([NaiveMean()])
model.fit(ts)
prediction = model.predict(10)
assert ts.components == prediction.components

raises an AssertionError

Expected behavior
No assertion error should be raised

System (please complete the following information):

  • Python version: 3.10
  • darts version 0.23.1
@DavidKleindienst DavidKleindienst added bug Something isn't working triage Issue waiting for triaging labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue waiting for triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant