chaospy icon indicating copy to clipboard operation
chaospy copied to clipboard

Sobol' and Halton sequences should start with 0

Open tupui opened this issue 4 years ago • 6 comments

Both sequences don't have (0, ...) as their first point. This is particularly wrong for Sobol' as it requires the number of samples to be a power of 2. Not having the zero will break the balance properties of the sequence when someone will request 2^n points.

I have a current PR about to be merged in scipy (scipy/scipy#10844) which introduce QMC with the zeros. There has been quite some discussions over there regarding the importance of having this point.

tupui avatar Sep 30 '20 07:09 tupui

Okay, that is an interesting discussion.

I think inclusion is the correct behavior as well. Also, I think this is an awesome addition to scipy, and I will quickly deprecate my own implementation for QMC in favor of yours as soon as it is released.

Am I understanding the conversation corretly, that this is most likely going to be in the scipy release by December?

jonathf avatar Sep 30 '20 07:09 jonathf

Am I understanding the conversation corretly, that this is most likely going to be in the scipy release by December?

That's also my understanding 🤞

Glad to here that you will be using this implementation 😃 . In that case, I am not sure that there would be a need to do extra work here and fix the zero in your implementation.

tupui avatar Sep 30 '20 08:09 tupui

Exactly. Much cleaner to get the new feature with the switching of backends.

jonathf avatar Sep 30 '20 10:09 jonathf

FYI, this is merged and will be in scipy 1.7. Let me know if you want some help to do a PR

tupui avatar Jan 30 '21 15:01 tupui

Thanks for the notice. I've actually followed the discussion for your PR. Interessting to observe the methodologies and the direction it is all taking.

I will make an initial PR as I am going to clean up a few other things when I am touching that part od the code again. But if you don't mind, I'd love for you to take a look when a first draft is ready.

jonathf avatar Jan 31 '21 16:01 jonathf

I will make an initial PR as I am going to clean up a few other things when I am touching that part od the code again. But if you don't mind, I'd love for you to take a look when a first draft is ready.

Of course, just ping me when you want me to review it 😃

tupui avatar Jan 31 '21 16:01 tupui