Closed mjburton11 closed 7 years ago
Looks great! Any clear way to reduce the number of lines of code? Right now it's net +7, not counting the new errors.
I tried reducing it by creating cs and exps from lhs and rhs but ran into some issues with higher dimensions. Any ideas?
If you use .min()
it'll search across any number of dimensions.
@bqpd @galbramc why did it only fail on reynolds?
It had an extra large RMS error? Non-determinism? different versions of numpy interpreting the same SEED differently? Try running it again.
(I am not a huge fan of this unit-testing setup)
Test this please
Test this please
@bqpd can we set a seed so that it will be more deterministic or something?
I think we do! This seems fairly consistent though, so maybe it's a real bug?
How can I figure out the bug? I don't think I changed the way the rms is calculated so I don't know why it would be giving different answers.
Ack, I'll take a look tomorrow. These tests were by far the most frustrating part of refactoring fit
it passes on my computer, frustrating.
wow, very frustrating...
Yeah, my best guess is that a different numpy version is interpreting the fixed seed differently. I increased tolerance a bit (from 5e-4 to 1e-3), it's still a darn low error.
OK well I'm going to go ahead and merge this then
woot!
@bqpd and @whoburg ready for review. Sometimes the resulting fit contains a 0 or inf value. I think it should return an error if this happens.