Skip to content

Predicting on data with gaps in date variable #41

@vidarvr

Description

@vidarvr

I'm trying to predict on a test data where there are no values for weekends and holidays.

It seems to me that this is not allowed. At least when I try to predict such data I get this error:

predict(object = fitted, new_data = test_data_tbl, past_data = total_train_tbl)
Error in `verify_new_data()`:
! `new_data` includes obs that we can't generate predictions.
✖ Found `87` observations.

Here there is a gap in the test data, i.e. no observations for weekends.

For retail data where stores are closed during weekends, should I create value for the weekend and simply impute as zero since there is zero sales during weekends?

Similar for financial data where there is no trading on weekends, what should I do in such scenario? Creating artificial value for a stock price during weekends (weekend prices = closing on friday?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions