You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the _time_resolution calculation assumes that the data in self.X[self.date_column] is sampled at least in daily intervals. However, if the data is sampled at finer resolutions (e.g., seconds, minutes, or hours), the calculation self._time_resolution = (...).days results in a Zero.
When using time varaying intercept this will cause following error:
hsgp_kwargs.L = time_index_mid + DAYS_IN_YEAR / time_resolution
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
Proposal to raise a ValueError after calculating self._time_resolution:
if self._time_resolution == 0:
raise ValueError(
"Time intervals in date_column are not in full days. Ensure that the dataset's timestamps are sampled at least in daily intervals."
)
It took me a while to find out, that my timestamp data where sampled in the wrong resolution.
The text was updated successfully, but these errors were encountered:
My data is typically sampled at a frequency of 1 second, with a duration ranging from 1 to 5 hours. To use TVD with this data, I resample it to a daily frequency.
The current implementation of the
_time_resolution
calculation assumes that the data in self.X[self.date_column] is sampled at least in daily intervals. However, if the data is sampled at finer resolutions (e.g., seconds, minutes, or hours), the calculation self._time_resolution = (...).days results in a Zero.When using time varaying intercept this will cause following error:
Proposal to raise a ValueError after calculating
self._time_resolution
:It took me a while to find out, that my timestamp data where sampled in the wrong resolution.
The text was updated successfully, but these errors were encountered: