Comments (5)
Can you post the line here? not able to find the numbered line you are referring to?
from modern-time-series-forecasting-with-python.
Yeah here it is, for the expanded form you are using x['day'].max() instead of max_date:
dr = pd.date_range(start=x['day'].min(), end=x['day'].max(), freq="1D")
Also, the pre-processing steps make sense but for some reason, experimenting with block_1: for compact form, I was not able to find any NaNs despite some of the LCLids having an earlier end_date and altho the expanded form has NaNs, they are in its LCLid and not missing values for existing LCLids (do we need a ffill here?)
from modern-time-series-forecasting-with-python.
I guess this line is from the expanded form function. It is x['day'].max() itself, because intention there is to insert NaNs only in between start and end of each time series.. If a timeseries last value is before max_date
, we are not adding NaN from that date to max_date
.
And in compact form, there wouldn't be NaNs because the entire timeseries is stored as a list in a cell of the dataframe.. the NaN would be inside the list.
from modern-time-series-forecasting-with-python.
I see, that makes sense. It raises one more question from me though - why are we adding NaN from end of time series to max_date for the compact form preparation. Also, you might need to make an update to the book to the expanded form function explanation (you mention - "2. Create a standard DataFrame using the start date and the global end date." instead of x['day'].max
Thanks for your time. Really appreciate it!
from modern-time-series-forecasting-with-python.
closing the issue
from modern-time-series-forecasting-with-python.
Related Issues (20)
- [Chapter 08] Gradient boosting decision trees, Mistype HOT 1
- Chapter 13) output tensor dimension error HOT 1
- sklearn.linear_model RidgeCV got an unexpected keyword argument 'normalize' HOT 2
- Issues installing environment on M2 Macbook Air
- Chapter 08 : 01-Forecasting with ML HOT 2
- Setting up environment: 404 pytorch HOT 1
- Reference to downloaded code in preface before download location is mentioned HOT 1
- Abstract method supports_multivariate not implemented in baselines.py HOT 2
- Target Transformation in ML_Forecast class not working (workaround solution included) HOT 1
- In implementation of Seasonal Decompose (STL) with FourierSeries, `max_cycle=np.max(seasonal_cycle)` is wrong? HOT 2
- For BoxCoxTransformer, `y = self._add_one(y)` twice in fit + transform?
- TypeError: Passing a set as an indexer is not supported. Use a list instead. Occured in Chapter08. HOT 2
- ValueError from `eval_model` function within Chapter 4: 02-Baseline Forecasts using darts.ipynb Cell 12 HOT 1
- Mismatch between `ts_utils.py` implementation of `forecast_bias` vs what is written in Chapter 4 of Book
- Chapter 4- 02-Baseline Forecasts using darts
- Command "conda env create -f anaconda_env.yml" fails HOT 2
- Chapter 07 Code
- Can't download "src" package HOT 1
- Unable to load environment on windows 11 HOT 1
- ML forecasting notebook 1 chapter 8 breaks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modern-time-series-forecasting-with-python.