add new HashedRandom guess option and make it the default#4445
add new HashedRandom guess option and make it the default#4445oscardssmith wants to merge 8 commits intoSciML:masterfrom
Conversation
AayushSabharwal
left a comment
There was a problem hiding this comment.
The enum is also used in the SCCNonlinearProblem constructor, so it needs to be handled there as well.
c3e7e6f to
e8564f5
Compare
|
Would this cause silent or hard-to-find bad behavior in the event of missing guesses, where the random algorithm selects bad values? It's a nice idea though, if you make it default at least it can be disabled with 1 kwarg to |
My argument is that if bad guesses crash initialization then you're in just as bad a spot as if you had gotten an error before initialization started (but if the guess doesn't matter, then this version is strictly better). We do probably want to mention in the error message if initialization fails that you should consider adding guesses if you know roughly how you want to initialize). |
AayushSabharwal
left a comment
There was a problem hiding this comment.
It would also be nice if the magic constant 0x1p64 was a global constant and/or the hashing logic its own function, so that we can be sure the implementation in SCCNonlinearProblem is the same as the one in problem_utils.jl.
Co-authored-by: Aayush Sabharwal <aayush.sabharwal@gmail.com>
Co-authored-by: Aayush Sabharwal <aayush.sabharwal@gmail.com>
HashedRandomuseshash(var)/2^64as an initial value which has the significant advantage over regular random of being deterministic. As such, I think this is a generally reasonable initialization (although it might make sense to also add a multiplication bygetnominalfor bothRandomandHashedRandomnow that #4425 is merged.