Model fit behaves very differently between `datetime64[ns]` and `datetime64[ms]`.
Open
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
I was unknowingly passing a dtype of `datetime64[ms]` to prophet and getting a _very_ poor fit. Converted back to `datetime64[ns]` and model fit behaved as expected. It might be worth adding a check to warn other users.
My approach to convert was: `df['ds'] = pd.to_datetime(df['ds'].dt.strftime('%Y-%m-%d'))`
NB: A possible cause of getting the `[ms]` type is converting from a polars frame.
Contributor guide
Assessment
This issue has not been assessed yet.