Giter Club home page Giter Club logo

Comments (5)

manujosephv avatar manujosephv commented on July 24, 2024

Can you post the line here? not able to find the numbered line you are referring to?

from modern-time-series-forecasting-with-python.

nisargvp avatar nisargvp commented on July 24, 2024

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.

manujosephv avatar manujosephv commented on July 24, 2024

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.

nisargvp avatar nisargvp commented on July 24, 2024

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.

manujosephv avatar manujosephv commented on July 24, 2024

closing the issue

from modern-time-series-forecasting-with-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.