Throws a NaN even though dataset / output are just numbers.
See original GitHub issueWhat is wrong?
Getting {"error": null, "iterations": 20000}
even though training dataset are just numbers.
Where does it happen?
When brain.js trains data in my sample website running in Chrome 65 on Mac
How do we replicate the issue?
Input data: https://gist.github.com/digi0ps/65bebf027876f85b42ab7b4dd2ba49bf Code:
let net = new brain.NeuralNetwork();
net.train(encoded);
trained = net.toFunction()
How important is this (1-5)?
- Just trying to learn. But I’m curious as to why it’s not working
Expected behavior (i.e. solution)
Error shouldn’t have been NaN. When I run net.run
with an input I get
{english: NaN, tanglish: NaN}
instead of values inside them.
Other Comments
Here is the NeuralNetwork object: https://gist.github.com/digi0ps/53292e8c55c31b7de8de9dcb06ea22e5
Can you help? Regards, Sriram.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (6 by maintainers)
Top Results From Across the Web
NaN - JavaScript - MDN Web Docs
The global NaN property is a value representing Not-A-Number. ... Even when this is not the case, avoid overriding it.
Read more >Trying to add ints from database to a let but always ...
I've been trying to get some numbers from a table in my database (MySQL/PHPMyAdmin) and add those to a "let" in the code,...
Read more >Handling Missing Data in Pandas: NaN Values Explained
NaN means missing data Note also that np. nan is not even to np. nan as np. nan basically means undefined.
Read more >If it's not a number, what is it? Demystifying NaN for the ...
Short for “Not a Number”, even its name is a paradox. Only floating-point values can be NaN, meaning that from a type-system point...
Read more >Input contains NaN, infinity or a value too large for dtype ...
How do I find the bad values in the test dataset? Also, I do not want to drop these records, can I just...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working example: https://jsfiddle.net/robertleeplummerjr/jvLw503L/10/
The issue is that your input array lengths are staggered. A simple fix of the following will bring results: