Thời gian tính bằng giây vẫn chưa phải là đầu vào hữu dụng cho mô hình. Nó phải có tính định kỳ hàng ngày và hàng năm rõ ràng. Một cách đơn giản là chuyển đổi thành một tín hiệu mà dùng sin và cos để chuyển đổi thành "Time of day" và "Time of year"
#### Estimate
#### Tests
- Đối với thời gian
```python
plt.plot(np.array(df['Day sin'])[:25])
plt.plot(np.array(df['Day cos'])[:25])
plt.xlabel('Time [h]')
plt.title('Time of day signal')
Description
Actions
datatime
sin
vàcos
để chuyển đổi thành "Time of day" và "Time of year"df['Day sin'] = np.sin(timestamp_s (2 np.pi / day)) df['Day cos'] = np.cos(timestamp_s (2 np.pi / day)) df['Year sin'] = np.sin(timestamp_s (2 np.pi / year)) df['Year cos'] = np.cos(timestamp_s (2 np.pi / year))