Skip to content

Conversation

@eytan
Copy link
Contributor

@eytan eytan commented May 24, 2019

Motivation

inv_transform was crapping out when drawing a large number of samples because the base sample was exactly 1.0( see issue #161). While we were previously subtracting off a small number (1e-10), this number wasn't sufficient. I found that (1-e6) was the smallest base 10 number we could subtract off to get rid of the -inf.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

import torch
from botorch.qmc.normal import NormalQMCEngine
normal_qmc_engine = NormalQMCEngine(d=2, seed=343, inv_transform=True)
samples = normal_qmc_engine.draw(10000, dtype=torch.float)
print(samples.max())

previously returned tensor(inf), but now it returns tensor(4.9010).

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/pytorch/botorch, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 24, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdaulton has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Use proper epsilons based on machine precision
@facebook-github-bot
Copy link
Contributor

@eytan has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdaulton has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@eytan merged this pull request in ba370e8.

@Balandat Balandat deleted the fix_inv_transform_for_base_samples branch June 25, 2019 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants