sberbank-ai-lab / LightAutoML

LAMA - automatic model creation framework
Apache License 2.0
887 stars 92 forks source link

DateSeasons transformer works wrong #106

Closed se-teryoshkin closed 2 years ago

se-teryoshkin commented 2 years ago

https://github.com/sberbank-ai-lab/LightAutoML/blob/master/lightautoml/transformers/datetime.py#L272

The problem is in this line. Method holidays.CountryHoliday returns a dict of datetime.date : str, but pandas dataframe may contain datetime.datetime types, thus it gives wrong result. It tries to compare datetime and date, of course it gives "False". image

To fix it we have to add .dt.date attributes to pandas Series and it will work fine. image