Skip to content

Fix xi -> q mapping in testSample#2

Open
timofeymukha wants to merge 4 commits intoKTH-Nek5000:masterfrom
timofeymukha:master
Open

Fix xi -> q mapping in testSample#2
timofeymukha wants to merge 4 commits intoKTH-Nek5000:masterfrom
timofeymukha:master

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