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

train_and_evaluate.ipynb ValueError: Input contains NaN, infinity or a value too large for dtype('float32'). #446

Open
segatrade opened this issue Jun 4, 2022 · 4 comments

Comments

@segatrade
Copy link

segatrade commented Jun 4, 2022

In tutorial: https://github.com/tensortrade-org/tensortrade/blob/master/examples/train_and_evaluate.ipynb
Implement basic feature engineering
sel.fit(X_train, precalculate_ground_truths(X_train, column='close'))
we got:
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

@bhavithran1
Copy link

Maybe your data has NAN values. Try X_train.dropna()

@Quentin168
Copy link

I also encountered this problem and tried X_train.dropna(), but problem still there, any more suggestions?

@Zymoo
Copy link

Zymoo commented Oct 8, 2022

Hey, also encountered this when returned to my code after some time off.

In my case it seemed to be an issue with Bitcoin volume at certain exchanges when using CryptoDataDownload. Change to BTC-USDT on Binance Exchange resolved this issue.

Hope it might help!

@newzapster
Copy link

newzapster commented May 12, 2023

This issue is related to the datetime stamp of UNIX. I had to revise the cdd.py file.

Also had to add below line:

data = data.drop(labels="compsum", axis=1)

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

5 participants