Add one time feature and extract the dates in the forecasting horizon - #676
Open
stephanielees wants to merge 10 commits into
Open
Add one time feature and extract the dates in the forecasting horizon#676stephanielees wants to merge 10 commits into
stephanielees wants to merge 10 commits into
Conversation
…to time features in data_loader.py
…the original setting)
modify the data loading
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.
There are two big changes I made in my branch
fin_econ.Firstly, I added one time feature, which is
CustomBusinessDay. This addition will allow users to apply the Informer to daily business time series that might not be regular, which is very common in financial data. For example, the data of the gold price (XAUUSD) is not available on Christmas days even if Christmas is on a weekday. So, the featureCustomBusinessDayis for daily business and observed days.Secondly, I also added a new property
self.pred_dates. This is for visualization purposes. When I first used the Informer, I realized that I couldn't extract the dates of the forecasted series out of the model. Thus, plotting the forecasts (which can be very useful in presentations) is a bit difficult. Adding this property is really helpful because the users then will not need to make their own time series index.Finally, the other little detail I modified is about
np.inf. The latestnumpydoesn't usenp.Infanymore, and using it gave me errors. So, I have to change it.