You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change TSDataset._check_endings to improve performance.
Motivation
Currently there is a not very optimal code for checking endings in TSDataset. It can be critical for transform and fit_transform method in dataset with many segments.
Proposal
Remove in TSDataset.check_endings cycle over segments. For example, use indexing like self.df.loc[max_index, pd.IndexSlice[:, "target"]].
馃殌 Feature Request
Change
TSDataset._check_endings
to improve performance.Motivation
Currently there is a not very optimal code for checking endings in
TSDataset
. It can be critical fortransform
andfit_transform
method in dataset with many segments.Proposal
Remove in
TSDataset.check_endings
cycle over segments. For example, use indexing likeself.df.loc[max_index, pd.IndexSlice[:, "target"]]
.You can test performance benefit on code:
In notebook you can use special tools for profiling.
Test cases
Add tests on
_check_endings
method.Alternatives
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: