Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果不需要填充呢,因为有些场景本来就是缺数据的,像股票价格存在休盘和节假日的情况,怎么将缺失的两个时间点拼在一起?避免在训练过程中产生错误,比如: #481

Closed
kachadx opened this issue Mar 28, 2024 · 2 comments
Assignees

Comments

@kachadx
Copy link

kachadx commented Mar 28, 2024

          如果不需要填充呢,因为有些场景本来就是缺数据的,像股票价格存在休盘和节假日的情况,怎么将缺失的两个时间点拼在一起?避免在训练过程中产生错误,比如:

1.ValueError: The point is out of the valid range
2.ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

Originally posted by @Hoogck in #266 (comment)

@Sunting78
Copy link
Collaborator

Sunting78 commented Mar 29, 2024

您好,这种情况可以设置freq='B'尝试一下,表示每工作日。如果该方式无法运行,可以通过按照之前几天均值的方式填充。

@kachadx
Copy link
Author

kachadx commented Apr 12, 2024

找到方法了,time_col不要设置,使用默认的RangeIndex,freq=1,这样就不会填充不存在的日期数据了

@kachadx kachadx closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants