This message was deleted.
# mlforecast
s
This message was deleted.
j
Hey. Do you have the holidays as a dataframe?
v
I can definitely create a dataframe with the holidays. However, I was using holidays.country_holidays with subdiv specified
j
If you have them as a dataframe you can treat them as exogenous features (guide)
Are you trying to just set a boolean is_holiday? Or are you looking to add several columns for each holiday?
v
I wanna try both ahah. For the moment, I only seek to have simple features, so will only keep is_holiday.
I'll check that guide. Thanks !
j
For a single column you can define a custom date feature like this:
Copy code
def is_holiday(dates):
    return dates.map(lambda x: x in holidays)
v
But what if holidays are not the same from a province to another one ? I wanna try to forecast on multiple time series that represent a certain location in the country
j
I see. Then the exogenous features approach is the best. Note that you'll have to define the dataframe by id and time, so you may have to repeat several rows
v
Thanks for your tips ! I'll definitely try that
👍 1