Skip to content

[BUG] Something went wrong with multi-index if backtest #461

Closed
1 task done
julia-shenshina opened this issue Jan 20, 2022 · 0 comments · Fixed by #771
Closed
1 task done

[BUG] Something went wrong with multi-index if backtest #461

julia-shenshina opened this issue Jan 20, 2022 · 0 comments · Fixed by #771
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@julia-shenshina
Copy link
Contributor

🐛 Bug Report

I ran code from How To Reproduce and got strange results: fold_info column in backtest's forecasts was not added to ts[:, segment] block but concatenated separately from other segment's columns.

Expected behavior

I expected smth like

|segment |     segment_0      |     segment_1      |      segment_2     |
-------------------------------------------------------------------------
|feature | target | fold_info | target | fold_info | target | fold_info |

How To Reproduce

Code

from etna.datasets import TSDataset, generate_ar_df
from etna.ensembles import VotingEnsemble
from etna.pipeline import Pipeline
from etna.models import NaiveModel
from etna.metrics import MAE

df = TSDataset.to_dataset(generate_ar_df(periods=100, start_time="2020-01-01", n_segments=3))
ts = TSDataset(df, "D")

HORIZON = 5
ensemble = VotingEnsemble(
    pipelines=[
        Pipeline(model=NaiveModel(lag=7), transforms=[], horizon=HORIZON),
        Pipeline(model=NaiveModel(lag=10), transforms=[], horizon=HORIZON),
    ]
)

_, forecasts, _ = ensemble.backtest(ts, metrics=[MAE()])
forecasts

Screenshots

Снимок экрана 2022-01-20 в 12 43 37

Environment

etna==1.5.0

Additional context

No response

Checklist

  • Bug appears at the latest library version
@julia-shenshina julia-shenshina added the bug Something isn't working label Jan 20, 2022
@iKintosh iKintosh added the good first issue Good for newcomers label Jan 20, 2022
@alex-hse-repository alex-hse-repository moved this to Specification in etna board Mar 25, 2022
@alex-hse-repository alex-hse-repository moved this from Specification to Todo in etna board Mar 25, 2022
@martins0n martins0n moved this from Todo to In Progress in etna board Jun 27, 2022
@martins0n martins0n assigned martins0n and unassigned martins0n Jun 28, 2022
Repository owner moved this from In Progress to Done in etna board Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants