Set libsvm's RNG
libsvm uses libc's standard rand() to get numbers to shuffle data. Stata has a set seed
feature, which initializes its own random number generator to a fixed value. This is important for reproducibility, checksumming the output, etc. But because libsvm uses a different generator the two are out of sync and using set seed
won't make reproducible output.
I don't know how to fix this. Try to sync the seed from one to the other? But the order of set seed
and loading libsvm isn't obvious. Sync it everytime svmachines
is called? But then multiple calls will produce identical outputs maybe? Or anyway be otherwise messed up?