Merged
Conversation
et calls in timeseries_generators.py _plot_func
…me type (and also code)
agataben
pushed a commit
to agataben/ATS
that referenced
this pull request
Dec 2, 2025
…taset_generator Feature/improve dataset generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the generate workflow in
HumiTempDatasetGenerator.It introduces a sub-series concatenation approach and supports multiple occurrences of the same anomaly type within a single series.
The plotting method is also updated to handle these cases.
Changes
New sub-series workflow
Each final time series is built by concatenating
nsub-series, each containing zero or one anomaly.This approach allows a single series to include multiple anomalies, even of the same type.
Support for variable anomaly ratios
Series without anomalies are alternated with series with anomalies according to anomalies_ratio.
auto_repeat_anomalies flag
True: anomalies are automatically reused to fill the requested number per series.
False: anomalies appear only as many times as listed in the anomalies argument. Even with False, you can repeat anomalies by listing them multiple times.
Step anomaly limitation
Limitation for
step_uv/step_mv: Short series containing step anomalies are not yet supported._divide_time_interval() raises NotImplementedError if time span is too short.
Static plotting method
plot_dataset() is now a static method and uses _plot_func to handle multiple anomalies of the same type.