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

TimeSeries Class in Safe-DS std-Lib #481

Closed
Gerhardsa0 opened this issue Oct 24, 2023 · 2 comments · Fixed by #508
Closed

TimeSeries Class in Safe-DS std-Lib #481

Gerhardsa0 opened this issue Oct 24, 2023 · 2 comments · Fixed by #508
Assignees
Labels
enhancement 💡 New feature or request released Included in a release

Comments

@Gerhardsa0
Copy link
Contributor

Gerhardsa0 commented Oct 24, 2023

Is your feature request related to a problem?

Right now we can not handle timeseries as timeseries in safe-ds.
Also the taggedtable cannot hold a feature column as a target column. In timeseries it is common that the target column is also a feature column.

Desired solution

Add a timeseries class to the safe-ds std-lib.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@Gerhardsa0 Gerhardsa0 added the enhancement 💡 New feature or request label Oct 24, 2023
@Gerhardsa0 Gerhardsa0 self-assigned this Oct 24, 2023
@Gerhardsa0
Copy link
Contributor Author

After working on this Issue for a while, I get pretty unsure if an extra time series class is really needed or a good style for the API. A time series share a lot of characteristics with tagged table. They differ in that a time series has a date_column, a windowsize, aforecasthorizon and allows an target_column also to be an feature column. But forecasthorizon are not really part of a time series and more part of "window settings".

In my newest commit in Branch, I wrote a Window generator, which would also work on tagged table or table.
This is a huge advantage, as I don't store the windows in the time series itself. I store references of the pandas' series in lists, so I can later load them into tensors faster. These are the functions are:
_create_all_windows_for_column and _create_all_labels_for_target_column in the TimeSeries class
I do this by using generator, which is faster and simpler in code.
(https://stackoverflow.com/questions/3487802/which-is-generally-faster-a-yield-or-an-append#comment3745740_3487844)
Another big advantage is, that I don't need an extra column type because the references are hold in separate lists and not in the table.

My Goal with that is, to use the generators as translator to tensors and only generate them, when they are needed as input. We don't need to store them in a table. So my main thought, why we should have a time series is kind of gone, because windows don't need to be stored.

A different take would be to create something like a translator tool, which takes a tagged table and some settings to define the input and creates then the Input for the neural networks.

@Gerhardsa0 Gerhardsa0 linked a pull request Nov 6, 2023 that will close this issue
@Gerhardsa0 Gerhardsa0 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@Gerhardsa0 Gerhardsa0 reopened this Dec 5, 2023
@Gerhardsa0 Gerhardsa0 linked a pull request Dec 13, 2023 that will close this issue
Gerhardsa0 added a commit that referenced this issue Jan 29, 2024
Closes #481 

### Summary of Changes

<!-- Please provide a summary of changes in this pull request, ensuring
all changes are explained. -->
added the time series class, with all basic tests and functionalities
so it can be used like a normal table or taggedtrable with an extra time column

---------

Co-authored-by: Ettl<AndiWrp>
Co-authored-by: Simon <s6snbreu@uni-bonn.de>
Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
Co-authored-by: Simon Breuer <86068340+sibre28@users.noreply.github.com>
Co-authored-by: Alexander <47296670+Marsmaennchen221@users.noreply.github.com>
lars-reimann pushed a commit that referenced this issue Feb 3, 2024
## [0.18.0](v0.17.1...v0.18.0) (2024-02-03)

### Features

* Add adjust_color_balance method in Image ([#530](#530)) ([dba23f9](dba23f9)), closes [#525](#525)
* Add find_edges method in Image ([#531](#531)) ([d728eb6](d728eb6)), closes [#523](#523)
* class for time series ([#508](#508)) ([73cdfb1](73cdfb1)), closes [#481](#481)
@lars-reimann
Copy link
Member

🎉 This issue has been resolved in version 0.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request released Included in a release
Projects
Archived in project
2 participants