-
Notifications
You must be signed in to change notification settings - Fork 817
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
[Documentation] TimeSeries parameter: frequency- what is it? #128
Comments
Hi woj-i, thanks for letting us know about the issue! To answer your questions about the
This will raise a ValueError:
This will work:
That being said, as far as I can tell the frequency parameter is not really the problem here. Instead, it probably has to do with your input data. More specifically, it is most likely caused because your time index does not have a consistent frequency, meaning that the time difference between two subsequent indices is not constant. I hope this helps. If not, please don't hesitate to reach out again! |
Thank you for explaining that! What I would suggest is to put an information, that filling missing dates with NaN is required for the input. As I understood from the doc you may fill it, but it did not seem to be required. Moreover, I've seen You could also add this reference https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases as possible values of "frequency" parameter. |
I think you're right about the documentation, it could definitely be made clearer. Also, the fact that a time series with business day frequency cannot be processed should be addressed as well I believe. Thanks for all of your inputs! |
I am facing the same issue with the weekends. I only have data for business days so the frequency is not consistent. Also I can't fill the weekends with null or 0 values because it would impact the model. In this particular case seasonality is not so important for me, so what I am doing is getting all the values of my original data without the dates, and then just joining it into a dataframe with a regular interval. I lose the precise information about when each value happened, but I can at least see how past values impact future ones. |
When processing the stock data, I met the same problem. It's such a common problem |
Update: Time series data with a business day index should now be supported, even when incomplete. In this PR we added the option to override the automatic frequency detection in the case of inconsistent frequency by setting the
passing
(source of data set used for test: https://www.kaggle.com/jacksoncrow/stock-market-dataset?) This patch has already been published to pip, so you can get the updated version of Darts like this:
Please let us know if this solved your issue! |
Thanks for being quick to solve it! I tried to update the package but I couldn't. Says that everything was already satisfied when I try to install it again, with or without --upgrade. Does it take some time to be available? |
Hi, it might take some time for the pypi to notice the changes, but meanwhile you should be able to install new version of darts by naming the specific version:
|
I tried to create a TimeSeries object with either constructor or from_dataframe method, but I get:
Could you please describe in more details the frequency parameter:
The text was updated successfully, but these errors were encountered: