AI-Feynman
AI-Feynman copied to clipboard
Linear Algebra Error
Received the following error when the code was "checking for generalized symmetry" and "trying (0, 1)":
LinAlgError: Array must not contain infs or NaNs
Is there any way to fix this?
I'm having the same problem.
Initially I was only getting it when trying to apply AIF to data covering big numbers (numbers going from 1 to 10^5 in the same column), so I was able to avoid it by "normalizing" the data to numbers of order 1 (just divided every column by the average of that column).
But when I increased the number o NN training Epochs from 500 to 5000 it came back, even on the "normalized" data.
Could you please share the input file so I can reproduce the error?
Same error with input file being this one: rocketData.txt
One example were I had this problem was (when using NN training Epochs of 5000):
The function used to generate the table is of the form:
const-x0x1/x2-x1x2/x0-x0*x2/x1
I am running into the same problem.
Exactly the same problem for me. a- @SJ001 did you manage to reproduce the error with the dataset given by @patrickfleith ? is it generic in every OS or specific to some installations of BLAS (as suggested here : https://github.com/numpy/numpy/issues/4291) ? b- I got a "results.dat" file but no "solution_{}" files in 'results' folder. Is is because the early stopping due to the LinAlgError ?
By the way, I like very much this "understandable" (and physically usable) ML work; Congrats !
Ran into the same issue. I'm inclined to think this might be a problem due to vanishing gradients, especially because you guys mentioned that playing with epochs or normalization appeared to prolong the inevitable. Depending on what causes the issue, np.nan_to_num
might be a quick fix. Another quick fix might be to add some batch normalization layers.
anyone got it working after facing the error?