Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix xi -> q mapping in testSample #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

timofeymukha
Copy link

I believe the GLL sampling type for testSample is currently buggy. As I understand it, for testSample, we are supposed to generate q, and then map it to xi. However, for the GLL case we end up doing both, starting with generating xi, mapping to q, and then mapping back. I think the first map from xi to q is incorrect.

q_=xi_*(self.qBound[1]-self.qBound[0])+self.qBound[0]

Assume qBound = [0, 1], since xi_ is in [-1, 1] for GLL, it follows that the bounds for q_ will be xi_*(1 - 0) + 0 = xi_, which is clearly wrong.
To fix this, I just copied the mapping code from the xi2q_map function in trainSample. I think this does the job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant